Scripts / Using Spawn Commands ??

Author
Message
GoDevils
10
Years of Service
User Offline
Joined: 24th Sep 2014
Location: Arizona USA
Posted: 23rd Jan 2021 23:33
During game play I move and entity to a new location.

Once it arrives at the new location I want to return the entity to it's original position.

Can this be done using the spawn command? If so how?
"THERE IS NO SPOON"

AMD 6300 6 core 3.5 ghz, Windows 10, 8GB ram, GTX 1060 2GB ram
smallg
Community Leader
19
Years of Service
User Offline
Joined: 8th Dec 2005
Location:
Posted: 24th Jan 2021 11:00
spawn is for stuff that was set to 'spawn at start = no'
to move something back to it's original location store the location in the init(e)
i.e. startx, starty, startz = GetEntityPosAng(e)
then when you want to move it back call
CollisionOff(e)
SetPosition(e, startx, starty, startz)
lua guide for GG
https://steamcommunity.com/sharedfiles/filedetails/?id=398177770
windows 10
i5 @4ghz, 8gb ram, AMD R9 200 series , directx 11
GoDevils
10
Years of Service
User Offline
Joined: 24th Sep 2014
Location: Arizona USA
Posted: 24th Jan 2021 22:38
Thanks smallg
"THERE IS NO SPOON"

AMD 6300 6 core 3.5 ghz, Windows 10, 8GB ram, GTX 1060 2GB ram

Login to post a reply

Server time is: 2024-12-22 02:13:07
Your offset time is: 2024-12-22 02:13:07