Facebook Twitter YouTube Frictional Games | Forum | Privacy Policy | Dev Blog | Dev Wiki | Support | Gametee


Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Model editor - Can Attach Character
Apjjm Offline
Is easy to say

Posts: 496
Threads: 18
Joined: Apr 2011
Reputation: 52
#1
Model editor - Can Attach Character

When defining body properties inside the model editor, there is an option for "Can Attach Character". From the naming, I am assuming this would mean i could actually attach this entity to the player somehow, if I were to check this option.

The only method that seems like it could do this is the following:
AddAttachedPropToProp("Player","test","test_entity.ent",1,1,1,0,0,0);
But this doesn't work, which I don't find surprising as the "Player" entity seems to only be considered when passed in as the parent in collision functions.

Of course, this may not be the correct interpretation of this option. It could, in fact, be suggesting that if that body were attached to something like a grunt it would prevent the entity from glitching out.

Is either of these two interpretations correct? If the first one is correct, how to I achieve the actual attach to the character?
(This post was last modified: 08-17-2011, 11:50 PM by Apjjm.)
06-29-2011, 07:28 PM
Find
MrBigzy Offline
Senior Member

Posts: 616
Threads: 18
Joined: Mar 2011
Reputation: 8
#2
RE: Model editor - Can Attach Character

I think character refers to physical objects in general. Hence when some objects are refered to as char or non-char, which is why the "attach to character" is checked by default. So if it wasn't checked, you wouldn't be able to attach it to any other object. You could probably test that to see if it's true.

If you are looking for a way to attach an object to the player, perhaps:

ConnectEntities(string& asName, string& asMainEntity, string& asConnectEntity, bool abInvertStateSent, int alStatesUsed, string& asCallbackFunc);

would work, since the player is considered an entity I think.
(This post was last modified: 06-29-2011, 08:45 PM by MrBigzy.)
06-29-2011, 08:45 PM
Find
Apjjm Offline
Is easy to say

Posts: 496
Threads: 18
Joined: Apr 2011
Reputation: 52
#3
RE: Model editor - Can Attach Character

ConnectEntities doesn't weld the two objects together like the Attach functions - to my knowledge it just connects the States of the two entites - e.g: if one breaks the other gets an impulse.

Regarding the Can Attach Character property, Attachments work fine irrespective of that setting being enabled, yet they will not attach to enemies on either setting. Additionally, just tested my second theory and that is a no-go either, the grunt still glitches out if you define a body and attach the mesh to it. Also tested treating the player as a "sticky area" in-case something odd like that worked, which it didn't.

I really am at a loss as to what this option actually does?
(This post was last modified: 06-29-2011, 09:59 PM by Apjjm.)
06-29-2011, 09:58 PM
Find
MrBigzy Offline
Senior Member

Posts: 616
Threads: 18
Joined: Mar 2011
Reputation: 8
#4
RE: Model editor - Can Attach Character

Maybe it's supposed to be "can attack character?" As in, when the body contacts you it does damage? Although grunt's don't have bodies defined by the user...maybe other entities can cause damage too. I kinda doubt it's that though.
06-30-2011, 01:46 AM
Find
Apjjm Offline
Is easy to say

Posts: 496
Threads: 18
Joined: Apr 2011
Reputation: 52
#5
RE: Model editor - Can Attach Character

Bumping this up in-case somebody can help me decipher the meaning of this option. I don't really want to go with the hacktastic solution I have come up with to the player-sticking problem, and would appreciate ruling out this method.
07-03-2011, 05:49 PM
Find
Apjjm Offline
Is easy to say

Posts: 496
Threads: 18
Joined: Apr 2011
Reputation: 52
#6
RE: Model editor - Can Attach Character

Finally worked out what this does!

This setting when checked makes the object apply a frictional force to the player when it is moving - in other words, it applies the object's motion to the player as if the player were attached to the object. For example, imagine a wheel spinning around like a carousel, and the player standing on the edge: if this option was checked the player would move around with the wheel, and if not, the player would not move due to the motion of the object.
08-17-2011, 11:49 PM
Find
nemesis567 Offline
Posting Freak

Posts: 874
Threads: 65
Joined: May 2011
Reputation: 10
#7
RE: Model editor - Can Attach Character

U saying that the player would spin around with the wheel as child? Could you give a clearer explanation please?

Today I dreamt the life I could live forever. You only know that when you feel it for you know not what you like until you've experienced it.
08-18-2011, 02:39 AM
Find
MrBigzy Offline
Senior Member

Posts: 616
Threads: 18
Joined: Mar 2011
Reputation: 8
#8
RE: Model editor - Can Attach Character

Kewlll.

Could make some cool puzzles with that. Do I hear booby traps?
08-18-2011, 02:42 AM
Find
Apjjm Offline
Is easy to say

Posts: 496
Threads: 18
Joined: Apr 2011
Reputation: 52
#9
RE: Model editor - Can Attach Character

(08-18-2011, 02:39 AM)nemesis567 Wrote: U saying that the player would spin around with the wheel as child? Could you give a clearer explanation please?

Imagine what would happen if you stood on the edge of a carousel in motion. You would rotate around with it yes? This is what "can attach character" does - when the player is in contact with the object, the player will move with it correctly - the player is treated as if he is "attached" at that point on the object if he remains still. If "can attach character" is not checked, then the object will spin, but the player will remain still, giving the illusion of hovering slightly off the object (when all that is happening is that there is 0 friction between the player and the object). This probably applies to tranlational motion as-well as rotation motion, but i haven't needed to test it with that yet.

Quote:Kewlll.

Could make some cool puzzles with that. Do I hear booby traps?
I've been using it to make a rotating platform as part of a jumping section for the teamnesia project Wink. Found it out totally by accident when one entity moved the player with it's motion and a different entity didn't.
(This post was last modified: 08-18-2011, 02:49 AM by Apjjm.)
08-18-2011, 02:46 AM
Find
nemesis567 Offline
Posting Freak

Posts: 874
Threads: 65
Joined: May 2011
Reputation: 10
#10
RE: Model editor - Can Attach Character

Dude!!!!!

You found exactly what I've been doing a thousand tweaks to create.

Today I dreamt the life I could live forever. You only know that when you feel it for you know not what you like until you've experienced it.
08-18-2011, 04:07 AM
Find




Users browsing this thread: 2 Guest(s)