Home   Help Search Login Register  

Author Topic: AI and players surrendering.  (Read 616 times)

0 Members and 1 Guest are viewing this topic.

MGeo

  • Guest
AI and players surrendering.
« on: 25 Feb 2004, 20:30:43 »
Hey all. I am new here. First i want to introduce then i will ask. I am playing OFP for three years and i still like it. I think that this is one of the best games i have ever played. I also like to make maps with the mission editor. It is really cool. I also love making free play maps with cars, peoples and flying things going around.
Now i want to ask this.

Is there a script that can make a AI drop the gun and do the animation the hands behind head. But this to happen when everyone in his group will die and he is alone and enemy's are all over him. So he will just surrender and the others will not shoot him. Also can you also do this like an action. For example if there are enemy's all around you and you can't do anything just to press this action and you will do the same animation and they will not shoot you. Can this be done?

Offline Raptorsaurus

  • Editors Depot Staff
  • *****
Re:AI and players surrendering.
« Reply #1 on: 25 Feb 2004, 21:00:02 »
Yes, it can be done.  If you look in the editor depot you can find a sample mission and script file called "ak_moves".  Basically this demo mission shows all the animated moves you can make a unit do.  And if you play the mission you can watch the guys go through all the motions you command.  The readme text with the demo list sall the "playmove" and "switchmove" types.  As far as making a surrender action you could do something like this with a script:

in the init feild of the player, or in a trigger that is activated, say when the palyer has no more ammo you could put:
Code: [Select]
sur = player addaction ["surrender","surrender.sqs]

Then you could make the "surrender.sqs" script somthing like:

Code: [Select]
player setCaptive true
remove action sur
exit

Lots of this stuff can be found in the OFP tutorials and in other forum threads, so you should search those.  It is best to search those before posting a question, so that you do not post something that has already been asked many times.  Read the introduction to scripting tutorial at the editor depot.

Kind Regards and welcome to the wonderful world of scripting (you can do things with scripting that you could never to with the editor alone.)
 :D

MGeo

  • Guest
Re:AI and players surrendering.
« Reply #2 on: 25 Feb 2004, 23:14:35 »
Hey thnx. I will try that one. Maybe it will work.

DBR_ONIX

  • Guest
Re:AI and players surrendering.
« Reply #3 on: 02 Mar 2004, 18:26:32 »
Try the playmove command to show the hands behind head thing..
player playmove "FXStandSurUniv"
 or "FXStandSurDown"
 or "FXStandSur"

All should be okay.. I think..
Not sure of the difference  ::)
- Ben