Home   Help Search Login Register  

Author Topic: The enemy comes looking...  (Read 760 times)

0 Members and 1 Guest are viewing this topic.

Gunther01

  • Guest
The enemy comes looking...
« on: 08 May 2005, 10:58:21 »
I was playing around on the editor the other day, and thought: "How cool would it be if I made a mission were the more stuff you blow up, or the more times you are spotted by enemy units, the more stuff comes looking for you?"

While having only basic ideas about scripting, i suppose that every time you are spotted, a num,ber is added to a variable, and depending upon the size of the number in that variable, more stuff would come looking for you.

It could start with a small patrol, followed by a large patrol, a couple of trucks, then an APC, then a tank, than a bigger tank, then some choppers, then everything, or something like that.

Also, if your not spotted for a while, the value in the variable will decrease, so less stuff is looking for you.

Very good for stealth missions were you have to keep out of site untill crunch time.  Then you have to hit hard and fast before dissapearing again, lest you be attacked by a tank company.

If anyone can make this happen, hell it would be awsome!

Offline Planck

  • Honoured
  • Former Staff
  • ****
  • I'm never wrong ....I'm just not always right !
Re:The enemy comes looking...
« Reply #1 on: 08 May 2005, 12:34:21 »
I think you are talking about the knowsAbout command.

Try looking it up in the command reference.


Planck
I know a little about a lot, and a lot about a little.

AHMzzz

  • Guest
Re:The enemy comes looking...
« Reply #2 on: 08 May 2005, 17:23:59 »
like Planck said "knowsAbout" can help you in here and also "domove getpos" might come in handy.

I think a script is required for this one, you can do it with triggers (lots of them). However, I am not sure if a trigger can help you in reducing your followers.

sounds like you came up with this Idea from GTA ;)

bluehand

  • Guest
Re:The enemy comes looking...
« Reply #3 on: 08 May 2005, 22:17:41 »
Something else that might help (read: I've never tried this, but I noticed it in the manual) is the rating function

_danger = rating player

It goes up automatically when you kill the enemy. There's also a command to add some to it for special actions (like blowing stuff up with a scripted action, maybe by calling an airstrike)

Gunther01

  • Guest
Re:The enemy comes looking...
« Reply #4 on: 09 May 2005, 08:04:39 »
This is all good stuff, but the problem is working out how to make more stuff come looking for you depending upon how much, and how much important stuff, that you blow up.

Offline Sui

  • Former Staff
  • ****
    • OFPEC
Re:The enemy comes looking...
« Reply #5 on: 09 May 2005, 13:33:33 »
I have done something similar in one of my (yet to be released) missions...

If the player is detected a couple of guys in a UAZ come to your last known position (there is a script to get them to disembark 500m from there and move around randomly).
Once you kill them, a squad in a truck comes.
Once you kill them, a squad in a BMP comes.
Once you kill them a platoon (3 squads in 3 trucks) come.
Once you kill them...

I'm sure you get the idea.

Basically I have a variable RForce, that I assign to the present group.
All the movement commands (ie. RForce move [(getpos lastposition select 0) + (random 200) - 100), (getpos lastposition select 1) + (random 200) - 100), 0]) are using RForce rather than the actual group name.

Then a script (you could also use a trigger) detects when the group is almost dead (or their vehicle immobilized) and changes RForce to the next group.
Works fairly well... kind of the like reinforcements in GTA :)

Offline Roni

  • Members
  • *
  • Play the Game !
Re:The enemy comes looking...
« Reply #6 on: 09 May 2005, 14:23:43 »
Ooh, baby - have I got THIS one covered !    ;D

Attached is script that should do EXACTLY what you're looking for !  Just run it from any unit in a group and away you go.  For best results use 4-6 groups and give each of them a Search and Destroy waypoint, a Cycle waypoint, a switch trigger set off by enemy presence and a second Seek and Destroy waypoint.

Each cycle the script gets the target units position, waits a bit then gets it again.  It then works out the distance moved by the target between cycles and projects a movement point in front of it based on the distance moved.  It then finds a point within 300m of that point and moves its designated waypoint to that position.

As the hunting unit gets closer to the target the hunt cycle gets shorter.  And as its knowsAbout rating goes up the hunt radius goes down.  Once the hunting unit moves within 200m of the target you start to get audio cues - a crow call, then distant voices, then loud voices.  A tight hunt can get pretty tense !

And best of all - no addons or special sound effects required !

The best way to avoid the hunters is to zigzag so that they're hunt pattern gets messed up.  And if they do start to track you down then the best way to avoid them is to keep low and stay out of sight -  if you can do this then often the hunting group will often get bored and start widening its search pattern.  Once they do you break cover and run in the opposite direction !

Everything that you need to know is in the script comment fields.

Have fun with it !



Roni