How to make a moving gate - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: How to make a moving gate (
/showthread.php?tid=586741)
How to make a moving gate -
ahameed4755 - 24.08.2015
im making a map and its half done but i wanna make a moveable gate how to make it? im using this map editor :
https://sampforum.blast.hk/showthread.php?tid=282801
Re: How to make a moving gate -
toxicape - 24.08.2015
Why you don't make the gate IG? Moveable only IG or in the script. I believe there is no chance to make moving with map editor.
Re: How to make a moving gate -
Logofero - 24.08.2015
Quote:
Originally Posted by ahameed4755
|
PHP код:
new obj_gates[2];
// Create gate
obj_gates[0] = CreateObject(16773, 397.4766, 2476.6328, 19.5156, 0.0, 0.0, 0.0, 100.0);
obj_gates[1] = CreateObject(16775, 412.1172, 2476.6328, 19.5156, 0.0, 0.0, 0.0, 100.0);
// Move gate
MoveObject(obj_gates[0], 397.4766, 2476.6328, 19.5156 + 10.0, 1.0, -1000.0, -1000.0, -1000.0);
MoveObject(obj_gates[1], 412.1172, 2476.6328, 19.5156 + 10.0, 1.0, -1000.0, -1000.0, -1000.0);
Re: How to make a moving gate -
ahameed4755 - 24.08.2015
Ok, thanks for reply
Re: How to make a moving gate -
Mariciuc223 - 24.08.2015
Quote:
Originally Posted by Logofero
PHP код:
new obj_gates[2];
// Create gate
obj_gates[0] = CreateObject(16773, 397.4766, 2476.6328, 19.5156, 0.0, 0.0, 0.0, 100.0);
obj_gates[1] = CreateObject(16775, 412.1172, 2476.6328, 19.5156, 0.0, 0.0, 0.0, 100.0);
// Move gate
MoveObject(obj_gates[0], 397.4766, 2476.6328, 19.5156 + 10.0, 1.0, -1000.0, -1000.0, -1000.0);
MoveObject(obj_gates[1], 412.1172, 2476.6328, 19.5156 + 10.0, 1.0, -1000.0, -1000.0, -1000.0);
|
Don't need to create 2 objects , one it's enough. You can make a bool to check if the gate it's closed/opened and if yes , move the gate ...
Re: How to make a moving gate -
Logofero - 24.08.2015
Quote:
Originally Posted by Mariciuc223
Don't need to create 2 objects , one it's enough. You can make a bool to check if the gate it's closed/opened and if yes , move the gate ...
|
it is only for clarity