Home   Help Search Login Register  

Author Topic: creating new units  (Read 1120 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"
creating new units
« on: 26 May 2003, 03:58:23 »
Hi
How r u all

I have a question about creating units
how do u make it so when a group is destroyed a new infantry squad is "created".

Id like to create a mission where you attack a base and once youve cleaned it out the base a counter attack force is createed to attack you.

can u help

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

polata

  • Guest
Re:creating new units
« Reply #1 on: 26 May 2003, 08:09:56 »
Go to home page then click on uptades.

On the left corner of the screen, there is Editors Depot Submissions. Click on (How to script a counter/attack)

Friznit

  • Guest
Re:creating new units
« Reply #2 on: 26 May 2003, 21:11:26 »
Hi m8.  Not sure who posted this little number in the Script Snippets pages - but it sounds like what yr after...I quote:

"Basically it allows a player to continually add extra guys under his/her command at the respawn point.

It only allows up to a maximum # that the creator specifies. Take a look:

First I added players that are in a group in and of themselves. Then I add the appropriate respawn point (Respawn_west for this example - I am using respawn at marker option). Then I add a game logic unit (we'll call this Create1) with the init field: this exec "addactions.sqs"

Now the Addactions script is:

_this addaction ["Create Soldier","1.sqs"]
_this addaction ["Create Medic","2.sqs"]
_this addaction ["Create Grenadier","3.sqs"]
_this addaction ["Create AA Soldier","4.sqs"]
_this addaction ["Create LAW Soldier","5.sqs"]
_this addaction ["Create AT Soldier","6.sqs"]
_this addaction ["Create Mortar Soldier","7.sqs"]
_this addaction ["Create MG Soldier","8.sqs"]
_this addaction ["Create Sniper","9.sqs"]
_this addaction ["Create G36a Soldier","10.sqs"]
_this addaction ["Create Steyr Soldier","11.sqs"]
_this addaction ["Create XMS Soldier","12.sqs"]
_this addaction ["Create Engineer","13.sqs"]
_this addaction ["Create BlackOp","14.sqs"]
_this addaction ["Create BlackOp (Day)","15.sqs"]
_this addaction ["Create BlackOp (Laser)","16.sqs"]
_this addaction ["Create BlackOp (XMS)","17.sqs"]
_this addaction ["Create Heavy Grenadier","18.sqs"]
exit

(now you can add whatever you wish and call the scripts whatever you like, but this is only for example)

Notice it adds actions to the game logic unit(anyone can use a different object if they like - truck for instance) that when a player gets close to it, the actions will appear in their menu somewhat like an ammo crate does.

now in each numbered script that the action calls contains the following:

_currentunits=count units group player ? _currentunits==1:_rank="LIEUTENANT" ? _currentunits==2:_rank="CORPORAL" ? _currentunits==3:_rank="PRIVATE" ? _currentunits>=4:goto "toomany" "SoldierWB" createunit [getpos create1,group player,"",1,_rank] exit

#toomany titletext["You already have max units.","plain"] exit

now everytime the player hits the action - it counts the number of guys he has (in this case max of 4 including himself) and adds the soldier to his group if he has room. "SoldierWB" can be of any type, and skill (in this case "1" or max skill) can be of any level.

I have tested this in MP and it creates units similar to "grabbing ammo" with a maximum of 3 additional units in this case. Now the game logic unit in my map is right by the respawn point, but it can be anywhere you would like to place it. Also, the players have a higher rank than Lt. It makes it interesting, in that when I die.. I respawn and they still are under my command, but if they die they do not respawn and I can call up a new soldier of any of the types listed.

Offline Tim Pink

  • ECP Team &
  • Former Staff
  • ****
  • "Down with a bang and that'll be the end"
Re:creating new units
« Reply #3 on: 27 May 2003, 01:56:46 »
hi again

Polata was talk about a home page with updates and how to script a counter attack.
Where is that?

oh and what im after is like in the Rescue rangers mission by nagual.
after you destroy the T80's and move on to the fort a whole heap of resitance men and tanks are spawned.

Thats what i want to do.
"Whoever said nothing is impossible, never tried slamming a revolving door."

Offline macguba

  • Former Staff
  • ****
    • macguba's operation flashpoint page
Re:creating new units
« Reply #4 on: 27 May 2003, 11:55:27 »
It's on this page
Plenty of reviewed ArmA missions for you to play

Offline Tim Pink

  • ECP Team &
  • Former Staff
  • ****
  • "Down with a bang and that'll be the end"
Re:creating new units
« Reply #5 on: 30 May 2003, 04:40:01 »
Thanks heaps Macguba

U r the man
"Whoever said nothing is impossible, never tried slamming a revolving door."