Home   Help Search Login Register  

Author Topic: A few questions  (Read 796 times)

0 Members and 1 Guest are viewing this topic.

Offline Tim Pink

  • ECP Team &
  • Former Staff
  • ****
  • "Down with a bang and that'll be the end"
A few questions
« on: 10 Jun 2003, 04:52:35 »
Hi again

I have a couple of Q's about markers
i have this mission where a delta operation went haywire and your holed up in a building with enemys swarming at you.
in the end a t72 rolls up to the house and an officer strolls up and issues an ultimatem
surrender of die

you use the radio to respond "surrender" or "fight on"(i want to find a better way of doing this without the radio)

if u choose "surrender" all the men in the building have their weapons removed "removeallweapons this" and then they are changed to a surrendering pose eg switchmove "fxsuruniv"

now i hit my first problem
once all the soldiers surrender u move to a marker(i know how to do that using the getmarker pos) but i want a truck to pull up and they get in it and drive to a prison camp
how do i do this without waypoints?

second question is
when u pick fight on a BAS rangerAT is spawned at a gamelogic location in some bushes near the t72
i want him to fire a missile from his AT4 launcher and then delete himself

how do i make sure he only fires one AT missile and then deletes himself because im pretty sure how the first and last bit goes?
Eg "BAS man dotarget or dowatch t72, (the line for the man pulling out the At launcher and firing one missile), BAS man dofire t72, deleteunit BAS man"

how do i configure the man to fire only One AT missile and then delete himself because at the moment he just goes prone and keeps with his M4

Thanx.
"Whoever said nothing is impossible, never tried slamming a revolving door."

SteroidG

  • Guest
Re:A few questions
« Reply #1 on: 10 Jun 2003, 06:23:52 »
For your 2nd question, maybe you can use addEventHandler at the init field of the AT soldier.

<name of AT soldier> addEventHandler ["fired", {deleteVehicle <name of AT soldier>}]

I'm not exactly sure if "fired" is the right event name so you might wanna double check.

SteroidG

  • Guest
Re:A few questions
« Reply #2 on: 10 Jun 2003, 06:36:03 »
For your 1st question, I have a question for you. Why not use waypoint? You can set the truc's waypoint's position over and over again by using setWPPos.

You can get the truck's WP to go to the first marker that all the prisoners should go, have a trigger that detects if all the prisoners are in, then set the truc's WP to a second marker which is located in the prison.

Oh by the way, you might have to lock the WP to do it.

Ace

  • Guest
Re:A few questions
« Reply #3 on: 11 Jun 2003, 13:38:53 »
Quote
you use the radio to respond "surrender" or "fight on"(i want to find a better way of doing this without the radio)

Use addaction commmand - player addaction ["Surrender", "Surrender.sqs"]
Where Surrender.sqs is a script for surrendering (You can put the commands removeallweapons and Switchmove in here too)


Quote
once all the soldiers surrender u move to a marker(i know how to do that using the getmarker pos) but i want a truck to pull up and they get in it and drive to a prison camp
how do i do this without waypoints?

at the end of surrender.sqs, have a line saying truck move getmarkerpos "PickUp"
Then in game have a trigger detailing this:
Condition : units group player in truck
onActiv. : truck move getmarkerpos "PrisonCamp"


Quote
when u pick fight on a BAS rangerAT is spawned at a gamelogic location in some bushes near the t72
i want him to fire a missile from his AT4 launcher and then delete himself

Use addaction again like this: player addaction ["Fight", "Fight.sqs"]
And in fight.sqs, you can write this:
Code: [Select]
RocketMan setcombatmode "Blue"
RocketMan setpos getmarkerpos "Bushes"
Rocketman dofire t72
? getdammage t72 < 0.9 : goto "Deletion"

#Deletion
deletevehicle Rocketman
Exit

OK, i know thats a lot to take in but it should all work, if you have any Q's on why I did some bits or how it allw orks just ask again.

Mr.BoDean

  • Guest
Re:A few questions
« Reply #4 on: 11 Jun 2003, 23:21:49 »
 On the AT soldier one-shot and then deletion:
  Just a suggestion, by why not let realism into the picture?
i.e. , Have some of those baddies take him out after the first shot, either by scripting them to target the AT soldier or even just setting them to aware/ combat mode. You can also easily eliminate multiple rockets being fired by removing his weapons and giving him only 1 rocket in his Init. line.   Just a thought. ....  ;)