jeppelykke 0 Posted June 25, 2003 Hey Hey I like to make a "chopper" taxi thingy where you jump in a chopper and click on the map where you want to go and the choppers goes there. BUT....... (Gotta love But's) Where do i write that code, and how do i prevent it from flying places if i click on the map for driffent reasons, or that i want more Click on the maps scripts. Where do i write this: onMapSingleClick "blah blah" so the script knows am refuring to chopper1 and not chopper2 or chopper3, if i wanted to make 3 driffent transport choppers ?:I Help / sugguestions more then welcome Best Regards, Jeppe Lykke, Denmark Share this post Link to post Share on other sites
iNeo 0 Posted June 25, 2003 Hey, I'm thinking about it, I'll edit this post when I'm home from work (around 18-19 our time). Share this post Link to post Share on other sites
RED 0 Posted June 25, 2003 1. Make an init.sqs with: <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">onMapSingleClick {[_shift,_pos] exec "clicked.sqs"} 2. Add a getin eventhandler to the player, this will be able to detect which chopper the player has entered. And add an eventhandler to check if the player has got out of a vehicle. Do this with: <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">player addEventHandler ["getin",{playerin = _this select 1}]; player addEventHandler ["getout",{playerin = 0}]; 3. clicked.sqs should be something like: <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE"> ? ! (_this select 0) : exit ? playerin == 0:exit _pos = _this select 1 playerin domove _pos 4. A crude way of checking to see if the player has selected an area would be to check if the _pos variable is a certain distance from a gamelogic. That is a very quick explanation that you should be able to work out what to do from. RED Share this post Link to post Share on other sites
jeppelykke 0 Posted June 26, 2003 Cool, thanx Best Regards, Jeppe Lykke, Denmark Share this post Link to post Share on other sites