OFPEC Forum

Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting Multiplayer => Topic started by: zip on 03 May 2003, 19:46:48

Title: got 2 qustiens ( NEEDS quick help )
Post by: zip on 03 May 2003, 19:46:48
well.......

1) is it possible to make 2 different spawn points ? beacuse I have a paratropper group and a infanterny group... and when the inftaney group spawns. Then they spawn at the paratroppers spawn :(

2) iam doing an invasion 1944 mp mission... and when my units respawn they start with a ak47 in thir hands ? :P ermp ak47sÂ'in ww2 ? :D not really..... not iam asking "is there any way to configure the standard weapons ?" if so please post a detailed post here :)

cheers from zip :F
Title: Re:got 2 qustiens ( NEEDS quick help )
Post by: Black_Feather on 04 May 2003, 15:28:32
For the second Q I believe you want this script (http://www.ofpec.com/editors/resource_view.php?id=301) from toadlife.
Title: Re:got 2 qustiens ( NEEDS quick help )
Post by: Terox on 04 May 2003, 16:42:47
look at the sticky thread at the top called "Respawning" it has all the info you need
Yes you can have as many different respawn points as you want, you can make them random, you can respawn to a set location through a condition etc etc
Title: Re:got 2 qustiens ( NEEDS quick help )
Post by: Tactician on 04 May 2003, 18:34:05
He wants a specific group to respawn at a specific place, not randomly.  For that some scripting intervention is needed.

I'll use, for example purposes, infGroup and paraGroup.  I assume you have named your groups; if not, put this in the init field of each man in the para group:

paraGroup = group this

And the infantry group:

infGroup = group this

This way the group names are assigned even if some soldiers are excluded (i.e. AI is disabled).

The next step: put the respawn marker at the infantry respawn.  You won't need a marker at the paratrooper respawn.

Now make a game logic named paraSpawn and place it where the paratroops should respawn.

At this points we add the extra scripts.

init.sqs snippet
Code: [Select]
;; add this line to your init.sqs
;; (or make an init.sqs if you don't have one)
?(player in (units paraGroup)): [] exec "pararesp.sqs"

pararesp.sqs
Code: [Select]
;; this will check for player respawn and move soldier to paraRespawn
#start
@!alive player
@alive player
player setPos (getPos paraRespawn)
goto "start"

There you go.. let me know if it works.
Title: Re:got 2 qustiens ( NEEDS quick help )
Post by: zip on 04 May 2003, 21:28:43
thank you to anyone I will tjeck this on thusday ( havent time before there... )