move_script() { time = 5;// Change this to how fast the model should move in seconds. moving_model = getentarray ("moving_model", "targetname"); move_trigger = getent ("move_trigger", "targetname"); destination_point = getent ("destination_point", "targetname");
In radiant, right click in the 2d view and go to "script" then "origin" and then a small red box should pop up. Press N to get to the entity window and give it this KVP.
targetname destination_point
And place the red box to wherever you want the model to move to.
2. With go to a certain point, I assume that you mean that you will touch something that makes the model to start moving. So right click in the 2d view again and go to "trigger" then click "multiple" and bring up the entity wondow again and give it this KVP,
targetname move_trigger
and place that trigger to wherever you want the player to touch that makes the model to start moving.
3. Now for the model that you want to move, right click in the 2d view and go to "script" then click "model" and choose your model that you want to move. After you have found your model, give it this KVP,
targetname moving_model
Done!
Also, if you want, you can also look at the script so you can see and learn how it works .
Tell me if anything goes wrong and I will try to help.
move_script() { time = 5;// Change this to how fast the model should move in seconds. moving_model = getent ("moving_model", "targetname"); move_trigger = getent ("move_trigger", "targetname"); destination_point = getent ("destination_point", "targetname");
Player = Get_Players(); for( i = 0; i < player.size; i++ ) { move_trigger waittill ("trigger", player); move_trigger delete(); moving_model moveto (destination_point.origin, time); } }
In radiant, right click in the 2d view and go to "script" then "struct" and then a small red box should pop up. Press N to get to the entity window and give it this KVP.
targetname destination_point
And place the red box to wherever you want the model to move to.
2. With go to a certain point, I assume that you mean that you will touch something that makes the model to start moving. So right click in the 2d view again and go to "trigger" then click "multiple" and bring up the entity wondow again and give it this KVP,
targetname move_trigger
and place that trigger to wherever you want the player to touch that makes the model to start moving.
3. Now for the model that you want to move, right click in the 2d view and go to "script" then click "model" and choose your model that you want to move. After you have found your model, give it this KVP,
targetname moving_model
Done!
Also, if you want, you can also look at the script so you can see and learn how it works .
Tell me if anything goes wrong and I will try to help.
edge im not sure but i think you need getStruct("ent","targetname"); to aquiare an struct also the for loop you're running on the players should be running over the moving model only if you get it like this
edge im not sure but i think you need getStruct("ent","targetname"); to aquiare an struct also the for loop you're running on the players should be running over the moving model only if you get it like this
I have used getent in that kind of script many times and it works perfect with the struct, and it works perfect for me.
Oh thank you JJbradman, the loop for the players was a very stupid mistake, I don't know what I was thinking about, but thanks for paying attention for that!
Script updated.
Also, to implimet the script follow these steps.
Go to root/raw/maps/ and copy any .gsc file and paste it to your desktop.
Then open that file and delete the script inside it. And then paste the script I gave you and paste it in that file.
Save and close and rename the .gsc file to let's say
Code Snippet
Plaintext
moving_object
Then copy and paste that file into root/raw/mods/MAPNAME/maps/
After you have done that, open your MAPNAME.gsc and search hold CTRL and press F and search for,
Code Snippet
Plaintext
maps\_zombiemode::main();
After you have found that line, then paste this line,
I have used getent in that kind of script many times and it works perfect with the struct, and it works perfect for me.
Oh thank you JJbradman, the loop for the players was a very stupid mistake, I don't know what I was thinking about, but thanks for paying attention for that!
Script updated.
Also, to implimet the script follow these steps.
Go to root/raw/maps/ and copy any .gsc file and paste it to your desktop.
Then open that file and delete the script inside it. And then paste the script I gave you and paste it in that file.
Save and close and rename the .gsc file to let's say
Code Snippet
Plaintext
moving_object
Then copy and paste that file into root/raw/mods/MAPNAME/maps/
After you have done that, open your MAPNAME.gsc and search hold CTRL and press F and search for,
Code Snippet
Plaintext
maps\_zombiemode::main();
After you have found that line, then paste this line,