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
SetMoveObjects works with Hands too..? or not..
Amnesiaplayer Offline
Senior Member

Posts: 539
Threads: 105
Joined: Jun 2014
Reputation: 0
#1
SetMoveObjects works with Hands too..? or not..

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)
02-22-2015, 10:54 PM
Find
Mudbill Offline
Muderator

Posts: 3,881
Threads: 59
Joined: Apr 2013
Reputation: 179
#2
RE: SetMoveObjects works with Hands too..? or not..

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.

02-23-2015, 01:46 AM
Find
Amnesiaplayer Offline
Senior Member

Posts: 539
Threads: 105
Joined: Jun 2014
Reputation: 0
#3
RE: SetMoveObjects works with Hands too..? or not..

(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
02-23-2015, 01:38 PM
Find
Romulator Offline
Not Tech Support ;-)

Posts: 3,628
Threads: 63
Joined: Jan 2013
Reputation: 195
#4
RE: SetMoveObjects works with Hands too..? or not..

(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.

Discord: Romulator#0001
[Image: 3f6f01a904.png]
(This post was last modified: 02-23-2015, 02:37 PM by Romulator.)
02-23-2015, 02:36 PM
Find
Mudbill Offline
Muderator

Posts: 3,881
Threads: 59
Joined: Apr 2013
Reputation: 179
#5
RE: SetMoveObjects works with Hands too..? or not..

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.

(This post was last modified: 02-23-2015, 02:43 PM by Mudbill.)
02-23-2015, 02:43 PM
Find




Users browsing this thread: 2 Guest(s)