Frictional Games Forum (read-only)
SetMoveObjects works with Hands too..? or not.. - Printable Version

+- Frictional Games Forum (read-only) (https://www.frictionalgames.com/forum)
+-- Forum: Amnesia: The Dark Descent (https://www.frictionalgames.com/forum/forum-6.html)
+--- Forum: Custom Stories, TCs & Mods - Development (https://www.frictionalgames.com/forum/forum-38.html)
+---- Forum: Development Support (https://www.frictionalgames.com/forum/forum-39.html)
+---- Thread: SetMoveObjects works with Hands too..? or not.. (/thread-29644.html)



SetMoveObjects works with Hands too..? or not.. - Amnesiaplayer - 02-22-2015

I want to make a Hand, going UP form the "ground" actually, the moving slime. i want that if you click on a button, that the hadn (with the key) will go up, so you can pick the key. my scripts are good, look

SetEntityPlayerInteractCallback("Button", "func1", true);

void func1(string &in asEntity)
{
SetMoveObjectState("Hand",1.0f);
PlaySoundAtEntity("", "24_iron_maiden.snt", "Jumpscare1", 0, false);
}
(yes this is not the whole part of the script, even not with the onstart etc, but only the things i want)

as you ca nsee, there is a button named "Button" and the Function (func1) will be Setmove etc the "Hand" it's Grunt's Body Part 1.

and you can see i did the Jumpscare sound to. and that''s to test it out. if i hear the sound, it means the scripting works, but the setmoveobject with the hand doesn't. and yes it worked. but the "Hand" doesn't move...
I really want to make this cool xd
(and yes, if the hand will work, i will do the same "SetMoveObjectState("Hand",1.0f);" for the key Tongue

(Sorry for bad English)


RE: SetMoveObjects works with Hands too..? or not.. - Mudbill - 02-23-2015

What hand are you using? For it to work, you must have a MoveObject type entity, and in this case set to the Y axis.


RE: SetMoveObjects works with Hands too..? or not.. - Amnesiaplayer - 02-23-2015

(02-23-2015, 01:46 AM)Mudbill Wrote: What hand are you using? For it to work, you must have a MoveObject type entity, and in this case set to the Y axis.

I have the Grunt's Body Part 1. in the Cat- Organic it's a (only one part) arm from the monster "grunt" Tongue
and i don't think it's a Setmoveobjectstate Sad
but i thought everything could move with scripting... like... a saw alot of moving stones, moving chairs. and no, i don't mean the propforce, where the chairs/naked mans moves Roughly forwards. i actually mean, the normal movement. like a hand, moving up. there is a spider things, and the hand i use is INSIDE it, when you push the button, it will raise up with the key in hadn (both "Static") so you can pick up the key Tongue


RE: SetMoveObjects works with Hands too..? or not.. - Romulator - 02-23-2015

(02-23-2015, 01:38 PM)Amnesiaplayer Wrote: it will raise up with the key in hadn (both "Static") so you can pick up the key Tongue

By this, do you mean that both of them have Static Physics ticked in the Level Editor? If so, then they will not move from their position at all, since it sets the mass to be equal to 0. An entity needs a mass greater than 0 to move or in the least be affected by gravity.

Based on what you have said, you will need to make a new arm entity using the Model Editor, since your arm needs to lack gravity in order to rise upward to give the player the key.


RE: SetMoveObjects works with Hands too..? or not.. - Mudbill - 02-23-2015

MoveObjects do not need mass to move, but they will only move by script. If you have both mass and a script to move it upwards, it likely won't work as it will fall back down.

Anyhow, yes you will need a new entity. What you've seen probably consists of new entities using existing models (it's very common). Just import the mesh in the Model Editor, then make it into a MoveObject.

Doing the same with the key should work too, but if the MoveObject has a collision box, it might also push the normal dynamic key with it as it moves.