OFPEC Forum
Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting General => Topic started by: hyori on 09 May 2005, 02:42:48
-
for example, i would like to remote control a tank from another location. being able to control the tank using the mouse, WSAD keys, etc (maybe using manual fire to shoot?). a press of a key would exit the remote control and go back to controlling my original soldier.
is this possible?
thanks
-
Movement using the w,s,a and d keys would likely be possible through use of the keyboard template script, here (http://www.ofpec.com/editors/browse.php?browsewhat=2&start=175). Using that and some setvelocity manipulation, movement should be easy.
Pitching with the mouse would also be easy (rotating in the x/y plane) via getdir commands. Yaw may be more difficult, however. Finally, firing the tank would be possible via a "fired" eventhandler attached to the player; but for this you would need a weapon that prefarably a.) had unlimited ammo, and b.) was unlikely to injure the player if he fired. For this you could look into the 'combatstrokegun' weapon or whatever it's called.
So, yes, this sounds perfectly possible.
-
Nice idea!! Please try to realice this cause I want that!!! :P
heehe an let me now... osrry I dont have time to experiment da shit
Byes
-
Hi, I experimented with this too.
I posted a sample mission there:
http://www.sinewsofwar.com/forum/viewtopic.php?t=48&postdays=0&postorder=asc&start=0&sid=0e35e19b26cafb03baa91a18f7085106
it's called 'fake'
Using the keyboard template ill be better though, have a look what I did, maybe you'll get some ideas.
h