Home   Help Search Login Register  

Author Topic: Unit alive?  (Read 1226 times)

0 Members and 1 Guest are viewing this topic.

Offline Mike34

  • Members
  • *
  • I'm a llama!
Unit alive?
« on: 02 Jun 2008, 20:03:42 »
Hey guys, Im trying to create a mission with several radios. The radios do provide some rudimentery communications from the outposts of the enemy (ai). If the player is spotted by the ai that would trigger a reaction from the H.Q. (ai), but only if the radio is "alive" at that outpost. Ive tried "if (alive radio)" and "true (alive radio)" even "this (alive radio)" in the condition field of a trigger. This is a mission taken off the Resistance theme only this time your an american soldier in a foriegn land watching and getting intel as the country becomes unstable and is then occupied, (now wadda you do)? Some natives will choose to be resistance fighters through time (time is the issue) because the enemy respawns and resupplies. I dont know how to "create" a radio yet but I will.Right now I could "teleport" a new one there. In short this game could go on forever. I could be more specific with an exact example if I need to. Thank you, Mike.

Offline Cheetah

  • Former Staff
  • ****
Re: Unit alive?
« Reply #1 on: 02 Jun 2008, 21:31:23 »
You can place the radio object (RT450 or whatever it's called) or use a fictional radio (nothing to be seen, just a variable turned on or off).

Name the object radio to something like, radio_outpost1 and then check it's status with:
Code: [Select]
getDammage radio_outpost1 > 0.95
Like missions? Help with Beta Testing! or take a look at the OFPEC Missions Depot for reviewed missions!

Offline Mike34

  • Members
  • *
  • I'm a llama!
Re: Unit alive?
« Reply #2 on: 02 Jun 2008, 22:06:46 »
Thanks for that. I shouldve explained better, my bad. A unit moves through its waypoints as natural. A trigger is synched to the second W.P.  in that trigger condition field is something like alive radio (radio is the name of the radio). As long as that radio is alive the unit moves through its w.p.s normaly. However if that radio is destroyed,killed the unit stops at the W.P. Or west detected by east trigger that only works if the radio is alive not destroyed. I hope that explains it better. These radios are what alot of the ai rely on. Mike

Offline Gcfungus

  • Members
  • *
Re: Unit alive?
« Reply #3 on: 03 Jun 2008, 00:20:18 »
I'll have a go, though I'm not entirely sure if this will work:

for the radio, you can't use the alive command, however you could assign a variable to it such as 'radioalive' or 'workingradio' then set that as true as default, and create a trigger to set it to false. In the trigger have the activation as whatever you want (getdammage radio_oupost1 > 0.95), and in the on activation have:
Code: [Select]
aP lockWP true
I'm pretty sure this will work:

For triggers that are reliant on other things, simply use the variable name. Therefore the trigger would have all its settings (east, present,etc) and in the condition change:
Code: [Select]
thisto
Code: [Select]
this && radioalive
All of this is untested, but is should work.  :D

-=GC=-Fungus1999
The object of war is not to die for your country, but to make the other bastard die for his.
~George Patton

Offline Mike34

  • Members
  • *
  • I'm a llama!
Re: Unit alive?
« Reply #4 on: 04 Jun 2008, 00:16:48 »
Thank you very much, so much of this scenario depends on the radios (player too). I want this scenario to be as realistic as I can. The destroyed radios will be resupplied a variable time later. Thank you Mike.

Offline Mike34

  • Members
  • *
  • I'm a llama!
Re: Unit alive?
« Reply #5 on: 17 Jun 2008, 05:19:33 »
Thanks GC Fungus. That works. I changed the radio to a radioman, Maybe thats more realistic. What I typed that works is Trig= west detected by east. Condition=this && (alive radio). On activation=name domove getmarkerpos "markername". radio is the name of the radioman ofcourse. Name (a unit) moves to the marker as long as radio is alive. If radio is dead before west is detected by east name does not move. Even if west is detected by a second east. Now for my next brain teaser( or headache). You guys are great. All of this knowledge. This place is like a script think tank. Thanks Mike.