Home   Help Search Login Register  

Author Topic: Remote Recall  (Read 924 times)

0 Members and 1 Guest are viewing this topic.

Dubieman

  • Guest
Remote Recall
« on: 05 Feb 2004, 01:22:42 »
I was thinking of making a script just to really test myself that when a radio call is signaled like alpha, your assigned jeep comes back to you or vehicle. Has this been done? Can it be done?
Please point me in the right direction with this script. :)


Code: [Select]
; ***************************************
; Operation Flashpoint Script
; ***************************************


;A script to simulate vehicles with remote control.
;Enjoy

_unit = _this select 0
_vehicle = _this select 1
_marker = getpos _unit
; ***************************************
;Here I want to check if the unit is alive.
#health
? (_unit ALIVE) false : goto exit
; ***************************************
;Here the marker should follow the unit so the vehicle goes to the marker.
#mark
_marker = setpos getpos _unit
loop : goto "mark"
; ***************************************
; Here I'm not sure what to do, I know it will be more complicated.
#return
_vehicle setdir setpos getpos _marker
_vehicle setvelocity [20,20,0]

Offline macguba

  • Former Staff
  • ****
    • macguba's operation flashpoint page
Re:Remote Recall
« Reply #1 on: 05 Feb 2004, 02:41:10 »
Loops must always have a delay like this
~1
or whatever time you want.

If you want to move markers around you'll need commands like setMarkerPos and setMarkerType.

You don't need "goto exit":  you can just put "exit".

The script will never get to #return because it will be going round the loop.   Either include the move bit within the loop, or run a seperate script for each.  A script file can only do one thing at a time.

I don't know if a vehicle remote control script has been done .... I have a feeling it has .... did LCD use one in a mission once?  
Plenty of reviewed ArmA missions for you to play

Offline Artak

  • The old beanbag shaker
  • Former Staff
  • ****
  • You want to talk about it, yes?
    • OFP Team Finlanders
Re:Remote Recall
« Reply #2 on: 05 Feb 2004, 10:55:41 »
I don't understand what you're trying to do here. However here's the script with fixes I noticed.



Code:
; ***************************************
; Operation Flashpoint Script
; ***************************************


;A script to simulate vehicles with remote control.
;Enjoy

_unit = _this select 0
_vehicle = _this select 1
_marker = getpos _unit
; ***************************************
;Here I want to check if the unit is alive.
#health
?! (ALIVE _unit): exit
; ***************************************
;Here the marker should follow the unit so the vehicle goes to the marker.
#mark
_marker = _getpos unit
"mymarker" setmarkerpos _marker
~1
?variable: goto "return"
goto "mark"
; ***************************************
; Here I'm not sure what to do, I know it will be more complicated.
#return
variable = false
_vehicle move getmarkerpos "mymarker"
_vehicle setvelocity [20,20,0]



If you wanted to simply make a vehicle come to you when you've made a radiocall you can do it much easier with waypoints. However here's the same in a script

_unit = _this select 0
_vehicle = _this select 1

#loop
?!alive _unit: exit
?variablefromradiotrigger: goto "move"
~1
goto "loop"

#move
_vehicle move getpos _unit
exit


Or have the radio trigger execute the script, so that it doesn't need to run in the background the whole time it's not needed.

_unit = _this select 0
_vehicle = _this select 1

_vehicle move getpos _unit
exit
Not all is lost.

Dubieman

  • Guest
Re:Remote Recall
« Reply #3 on: 05 Feb 2004, 20:40:42 »
Errr yeah I'll put the fixes in guys thanks a lot. Might be awhile though, I thought about trying this again and well seems to hard for my skill level maybe later. ::)

Got in over my head I did.... :P