How to make a moving gate
#1

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
Reply
#2

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.
Reply
#3

Quote:
Originally Posted by ahameed4755
Посмотреть сообщение
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
PHP код:
new obj_gates[2];
        
// Create gate
obj_gates[0] = CreateObject(16773397.47662476.632819.51560.00.00.0100.0);
obj_gates[1] = CreateObject(16775412.11722476.632819.51560.00.00.0100.0);
        
// Move gate
MoveObject(obj_gates[0], 397.47662476.632819.5156 10.01.0, -1000.0, -1000.0, -1000.0);
MoveObject(obj_gates[1], 412.11722476.632819.5156 10.01.0, -1000.0, -1000.0, -1000.0); 
Reply
#4

Ok, thanks for reply
Reply
#5

Quote:
Originally Posted by Logofero
Посмотреть сообщение
PHP код:
new obj_gates[2];
        
// Create gate
obj_gates[0] = CreateObject(16773397.47662476.632819.51560.00.00.0100.0);
obj_gates[1] = CreateObject(16775412.11722476.632819.51560.00.00.0100.0);
        
// Move gate
MoveObject(obj_gates[0], 397.47662476.632819.5156 10.01.0, -1000.0, -1000.0, -1000.0);
MoveObject(obj_gates[1], 412.11722476.632819.5156 10.01.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 ...
Reply
#6

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
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)