Jump to content

Loop


teppe

Recommended Posts

I did take a look at Jacks loop topic here in the forum but theres something wrong:

This is what i do:

Group: <Default>

Comment:

Trigger Event:

The simulation is starting.

Responses:

Set PlayerPlatoon to (The player-controlled platoon).

Use GetPlayerTeams to loop over all teams in PlayerPlatoon after this block.

Group: GetPlayerTeams

Comment:

Trigger Event:

A team loop is ready to process ThisTeam.

Responses:

Allow this block to be reactivated.

Increment PlayerTeamCount.

Set Charlie to ThisTeam.

Continue executing responses if ((The value of PlayerTeamCount) is less than 3).

Set Bravo to ThisTeam.

Continue executing responses if ((The value of PlayerTeamCount) is less than 2).

Set Alpha to ThisTeam.

Use GetPlayerTeams to loop over all actors in Alpha after this block.

Use GetPlayerTeams to loop over all actors in Bravo after this block.

Use GetPlayerTeams to loop over all actors in Charlie after this block.

Then i make a actorref called ''NextTeam''.

Then i make a new script:

Trigger: A team loop is ready to process Alpha

Trigger: A team loop is ready to process Bravo

Trigger: A team loop is ready to process Charlie

Group: Default

Then i have maked 3 zones called them insertion, insertion 2 and insertion 3. Nobody of them is marked by ''insertion'' in zine properties.

Teleport object: Teleport Next team to insertion 1

Teleport object: Teleport Next team to insertion 2

Teleport object: Teleport Next team to insertion 3

When i start the mission all the players are scatted, one meber of bravo in the right corner, etc.

Help

Teppe

Link to comment
Share on other sites

How about this (did this without access to Igor so the terminology might be a bit off):

Trigger Event:

The simulation is starting.

Responses:

Set PlayerPlatoon to (The player-controlled platoon).

Use GetPlayerTeams to loop over all teams in PlayerPlatoon after this block.

Group: GetPlayerTeams

Comment:

Trigger Event:

A team loop is ready to process ThisTeam.

Responses:

Call TeleLoop after this block.

Allow this block to be reactivated.

Increment PlayerTeamCount.

Set teamCharlie to ThisTeam.

Continue executing responses if ((The value of PlayerTeamCount) is less than 3).

Set teamBravo to ThisTeam.

Continue executing responses if ((The value of PlayerTeamCount) is less than 2).

Set teamAlpha to ThisTeam.

Group: TeleLoop

Comment:

Trigger Event:

(This is a call.)

Responses:

Use TeleLoopAlpha to loop over all actors in teamAlpha after this block.

Use TeleLoopBravo to loop over all actors in teamBravo after this block.

Use TeleLoopCharlie to loop over all actors in teamCharlie after this block.

Group: TeleLoopCharlie

Comment:

Trigger Event:

An actor loop is ready to process ThisActor.

Responses:

Allow this block to be reactivated.

Teleport ThisActor to InsertionCharlie

Group: TeleLoopBravo

Comment:

Trigger Event:

An actor loop is ready to process ThisActor.

Responses:

Allow this block to be reactivated.

Teleport ThisActor to InsertionBravo

Group: TeleLoopAlpha

Comment:

Trigger Event:

An actor loop is ready to process ThisActor.

Responses:

Allow this block to be reactivated.

Teleport ThisActor to InsertionAlpha

You could probably do this with interleaving loops but that would be a bit more complicated.

Link to comment
Share on other sites

Might try this, I have never used it but I bet it would work. It would not teleport the teams but it would teleport the individual players and you could split them evenly. Note that you can't teleport actors to different rooms -- this would work best in an outdoor environment.

Startup

Set Player Platoon Variable

VariableSet 'player 01' to the actor nearest insertion zone.

ContinueIf the number of actors on Player Platoon is greater than 1.

VariableSet 'player 02' to the actor nearest the actor nearest the insertion zone.

ContinueIf the number of actors on Player Platoon is greater than 2.

VariableSet 'player 03' to the actor nearest the actor nearest the actor nearest the insertion zone.

Just keep going back between Random Insert 01 and 02 (or 3 or 4 if you like) until you've made a

ContinueIf the number of actors on Player Platoon is greater than 8

Because the maximum number is 9 players in co-op. The reason I don't teleport the actors in the original loop is because it may not correctly teleport the actor nearest insertion zone because it is changing every time one gets teleported, I'm not sure how fast it would check. So the variable set works best. Make a new block now, for like one second elapsed.

One second has elapsed

Teleport 'player 01' to random insert A.

Teleport 'player 02' to random insert B.

etc. etc.

I would do a test to refine and confirm that it works but I don't have time, try it out and see if it works.

*EDIT*

But then of course if you had AI on the same team split up they'd try to regroup, probably running blindly into enemies and dying.

Edited by RileyFletcher_01
Link to comment
Share on other sites

  • 3 weeks later...

Soooooooo, now i'm asking: Is it possible to script if a member of player platoon is wounded, make a timer expire on 5 sec., and when thats expired, make the wounded player normal again, i mean so hes not wounded as he was for just around 5 secs ago?

Teppe

Link to comment
Share on other sites

Torching an actor is a visual effect that can be used to mark someone for various purposes, e.g. showing who to shoot or who is the current team leader or whatever. Contrary to what it sounds like, it does not affect an actor's health. :)

Link to comment
Share on other sites

  • 1 month later...

Well, just wanna know, i follow your sscript Apex, but ingame it works, its just sometimes Alpha is there, Bravo is there, Then next time Bravo is on Alphas old location and Alpha on third. Any way to change it, as the player could have possibility to choose his teams, so like there the briefing says there can be tanks etc?

Link to comment
Share on other sites

I don't quite understand what you mean, but if you are looking for the player team IIRC there's a query for the player controlled actor, so you could throw that in there to identify the correct team and have it teleport to the appropriate location. Does this mean you disable avatar switching?

Link to comment
Share on other sites

Eh not sure what you mean :P

I just say that, sometimes in a mission, if we say these are the insertions:

A-insertion (alphas)

B-insertion (bravos)

C-insertion (you guessed right lol)

Sometimes Alpha gets to A-ins when starting up, and Bravo to C-ins and Charlie to B-ins, then next time C gets to a etc

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...