Jump to content

Teleporting just one actor from Player's Platoon


OldSchoolDanger
 Share

Recommended Posts

I am trying to teleport an ACTOR, from the "PLAYERS PLATOON", from one zone to another. I have no problem teleporting the entire platoon. I would like to be able to teleport just one player at a time.

I have created a tag named PLAYER PLATOON ACTOR which references "THE PLAYER CONTROLLED ACTOR".

I've created a PROXIMITY ACTOR trigger. The trigger is supposed to teleport the PLAYER CONTROLLED ACTOR from the TELEPORTING LAUNCHING ZONE to the TELEPORTING LANDING ZONE.

I can't get it to work. Any ideas?

Link to comment
Share on other sites

I tend to use an effect to teleport a single actor instead of a zone. :) Also i choose to make actors invincible while being teleported.

Script 01:

To ensure this works 100% i would suggest you pick who is to be sent, and have them take slot A1.

Group: <Default>

Comment:

Setup

Trigger Event:

The simulation is starting.

Responses:

Set player platoon to (The player-controlled platoon).

Make all members of player platoon invincible.

Enable the Send 1 Man script blocks.

Set Send 1 Man to expire in 5 second(s).

Use Send 1 Man to loop over all actors in player platoon after this block.

Group: <Default>

Comment:

Invinc Off

Trigger Event:

Send 1 Man has expired.

Responses:

Make all members of player platoon vulnerable.

Group: Send 1 Man

Comment:

Send 1 man

Trigger Event:

An actor loop is ready to process this man.

Responses:

Teleport this man to Insert send 1.

Script 02:

To make it pick a random person from the player platoon, change the actor loop to this:

Group: Send 1 Man

Comment:

Send 1 man

Trigger Event:

An actor loop is ready to process this man.

Responses:

Teleport (The actor nearest Insertion) to Insert send 1.

That should work for you if i remember correct.

:thumbsup:

Link to comment
Share on other sites

While Tinker's solution may work, I must note that I find it a bit obscure... Why exactly are you running a loop if you just want to teleport one actor?

Here are the insertion/rappel script blocks from the Community Coop Tourney mission "A Cold Welcome", I think it will do what you want... Note there are two "rappel" locations -- so two take off and landing zones. The first block is called by the startup block to initialize things. There are some "cute" tricks in here about enabling and disabling script blocks to prevent two people from rappelling simultaneously. Also note the use of effects to mark the takeoff and landing locations.


Group: (INS) Rappel

Comment:

   Initialize rappel

Trigger Event:

   This block has been called directly from the script.

Responses:

   Enable the (INS) Rappel script blocks.

   Enable the (INS) Rappel 1 script blocks.

   Enable the (INS) Rappel 2 script blocks.


Group: (INS) Rappel

Comment:

   Rappel 1 execute

Trigger Event:

   TMR:Rapel1 has expired.

Responses:

   Allow this block to be reactivated.

   Make ACT:Rappel1 invincible.

   Play "rapel_2.wav" at Rappel 1 T/O with volume 1, looping for 0 second(s).

   Play "rapel_2.wav" at Rappel 1 Landing with volume 1, looping for 0 second(s).

   Set TMR:RapelDone1 to expire in 5 second(s).

   Teleport ACT:Rappel1 to Rappel 1 Landing.


Group: (INS) Rappel

Comment:

   Rappel 1 done

Trigger Event:

   TMR:RapelDone1 has expired.

Responses:

   Allow this block to be reactivated.

   Make ACT:Rappel1 vulnerable.

   Enable the (INS) Rappel 1 script blocks.


Group: (INS) Rappel

Comment:

   Rappel 2 execute

Trigger Event:

   TMR:Rappel2 has expired.

Responses:

   Allow this block to be reactivated.

   Make ACT:Rappel2 invincible.

   Play "rapel_2.wav" at Rappel 2 T/O with volume 1, looping for 0 second(s).

   Play "rapel_2.wav" at Rappel 2 Landing with volume 1, looping for 0 second(s).

   Set TMR:RappelDone2 to expire in 5 second(s).

   Teleport ACT:Rappel2 to Rappel 2 Landing.


Group: (INS) Rappel

Comment:

   Rappel 2 done

Trigger Event:

   TMR:RappelDone2 has expired.

Responses:

   Allow this block to be reactivated.

   Make ACT:Rappel2 vulnerable.

   Enable the (INS) Rappel 2 script blocks.


Group: (INS) Rappel 1

Comment:

   Rappel 1 start

Trigger Event:

   A member of Player Platoon is within 1 meter(s) of Rappel 1 T/O.

Responses:

   Allow this block to be reactivated.

   Set ACT:Rappel1 to (The actor nearest Rappel 1 T/O).

   Display ((The owner of ACT:Rappel1) + " is preparing to rappel.") to all players.

   Play "rapel_hook.wav" at Rappel 1 T/O with volume 1, looping for 0 second(s).

   Disable the (INS) Rappel 1 script blocks.

   Set TMR:Rapel1 to expire in 3 second(s).


Group: (INS) Rappel 2

Comment:

   Rappel 2 start

Trigger Event:

   A member of Player Platoon is within 1 meter(s) of Rappel 2 T/O.

Responses:

   Allow this block to be reactivated.

   Set ACT:Rappel2 to (The actor nearest Rappel 2 T/O).

   Display ((The owner of ACT:Rappel2) + " is preparing to rappel.") to all players.

   Play "rapel_hook.wav" at Rappel 2 T/O with volume 1, looping for 0 second(s).

   Disable the (INS) Rappel 2 script blocks.

   Set TMR:Rappel2 to expire in 3 second(s).

Edited by Buehgler_AS
Link to comment
Share on other sites

While Tinker's solution may work, I must note that I find it a bit obscure...

:D

Why fix something that`s not broken? Loop fixes possible hidden actors in or near insertion.

Other note: Try to build complicated scripts first and export for future missions.

Link to comment
Share on other sites

I'm lost guys.

Tinker, it sounds like your solution takes player platoon actors randomly somehow? I don't want to pick who is to be sent at a particular moment in the game. This is not a planned activity.

I just want these small teleporting launching zones to exist in 4 locations in the map. Multiplayer players can use them to take themselves from one side of the map to another. The "other" being the 4 teleporting landing zones.

Buehgler, I don't understand the timer aspect of the Rappeling. Nor do I understand the reason for making the members of player's platoon invincible while teleporting.

The way it works now, is that I have it setup to teleport the entire platoon, if a member of the players platoon enters the zone. You can imagine this is less than ideal, seeing as the other players all get teleported at the same time the first gets teleported.

An example is in the Embassy map, upstairs in the hotel, where the sniper shoots out of the window. When you run up the stairs, instead of going down the hallway to get to the sniper, you can run down the first hallway on that level, "through" the last door on your right, and "through" the first door on your left in the hallway where the sniper is standing. In essence taking a short cut.

The problem so far is that while Tom and Dick are engaging the tangos in the helo park, Harry wants to go get the sniper upstairs, and takes this "shortcut". Once he goes through the last door on his left, and appears in the sniper hallway, Tom and Dick do as well. Kind of confusing for poor Tom and Dick.

Link to comment
Share on other sites

I just want these small teleporting launching zones to exist in 4 locations in the map. Multiplayer players can use them to take themselves from one side of the map to another. The "other" being the 4 teleporting landing zones.

For this:

time elapsed 1 second

block preserve

continue if this actor is within 1 meter of teleport zone 1

teleport this actor to landing zone / effect 1

Would have to test it, but that should be fine.

<_<

Link to comment
Share on other sites

As said in first post, I tend to place an effect on the map instead of a zone, works the same, just have more control over it.

Now i see you after MP options. Import the Siege script from MP1 and you can see how the companys have been variable set at start up. With this reference implemented, you will be easily able to work your script better.

Simply company member in location equal to 1, teleport nearest actor...

:thumbsup:

Link to comment
Share on other sites

Buehgler, I don't understand the timer aspect of the Rappeling. Nor do I understand the reason for making the members of player's platoon invincible while teleporting.

The timing bits were to allow the sound effects to play, and for the player to finish the rappel (i.e. fall to the ground). This is a "rappel", so the destination is floating about 30m off the ground, and the player falls to the ground -- if they were not invincible they would break their legs. In general it is usually a good idea to make players invincible while teleporting them to avoid "accidents" that can happen if they land on another actor.

I'm also a bit confused.. Are you doing this for a mission or a TvT gametype (GTF)?

The simplest version of this for a mission would look like this:

(launch and land are the names of two effects I placed on the map -- they need to be in the same "room" otherwise teleprt does not work correctly)


Group: <Default>

Comment:


Trigger Event:

   The simulation is starting.

Responses:

   Set plt:player to (The player-controlled platoon).


Group: <Default>

Comment:

   Launch

Trigger Event:

   A member of plt:player is within 2 meter(s) of launch.

Responses:

   Allow this block to be reactivated.

   Set act:teleport to (The actor nearest launch).

   Make act:teleport invincible.

   Teleport act:teleport to land.

   Make act:teleport vulnerable.

The defects in this include that it will teleport the actor closest to launch, not necessarily the actor that triggered the script block (e.g. if there is a tango at the launch zone, it may get teleported). That is why Tinker's original solution used a loop to find the player that was closest. If you want to take all the members of the player platoon that are within range of the launch zone, I would use this:

Group: <Default>

Comment:

   1

Trigger Event:

   The simulation is starting.

Responses:

   Set plt:player to (The player-controlled platoon).


Group: <Default>

Comment:

   2

Trigger Event:

   A member of plt:player is within 2 meter(s) of launch.

Responses:

   Allow this block to be reactivated.

   Use Teleport 1 to loop over all actors in plt:player after this block.


Group: Teleport 1

Comment:

   3 Launch

Trigger Event:

   An actor loop is ready to process act:jumper.

Responses:

   Allow this block to be reactivated.

   Continue executing responses if ((The distance between act:jumper and launch) is less than 2).

   Make act:jumper invincible.

   Teleport act:jumper to land.

   Make act:jumper vulnerable.

Teleporting ONLY the CLOSEST player can also be done, but that requires a bit more effort and a short delay between entering the launching zone and the teleport actually happening. (you need to find the closest player in the loop, then have a timer cause them to be teleported). Doing all of this in a GTF just requires a bit more effort to set up company/platoon references during initialization, and then duplicating all the code to trigger appropriately for the different companies/platoons.

Link to comment
Share on other sites

:wall:

Argggh. I have read everyone's responses, again and again, and it's just not sinking in to my thick skull.

You know I have a launch and a landing zone.

You know I have a PLAYERS PLATOON ACTOR tag.

If you didn't know, this is a multiplayer co-op game.

I just don't think I'm grasping the starting from scratch concept. Here's a picture of the block window. Maybe it would help if you'd be able to tell me what I've left out.

blocktrigrespon.jpg

Link to comment
Share on other sites

ok - we go from the top.

1. Put a zone in the hallway at the door called DOOR.

2. Place an effect called DOOR_TELEPORT at the doorway where you want the player to come out of - im guessing that would be a doorway on the top floor somewhere.

3. Now similar to what Tinker said - create a new activity - called something like SHORTCUT.

Trigger = Proximity Player Platoon to DOOR

Action -

Block Preseve

ContinueIf a member of PLAYER PLATOON is within 3 meters of DOOR.

Teleport (Get nearest actor to DOOR) teleport to (DOOR_TELEPORT)

that should/will work, and it will only send one player at a time through the short cut.

and for a player to get teleported they would have to be within 3 meters of the DOOR.

Link to comment
Share on other sites

Ok, I think the confusion is that you are trying to use "player controlled actor" to reference the player that triggered your teleport block. This will just not work :( In fact, this is exactly why we are all using "Get nearest actor to XXX" to find the closest actor to the teleport location, and then teleporting that actor. Lightspeed's version is probably about as simple as you can possibly make this.

Here it is, as I think you described, on Embassy... Note the two effects I placed at the doors.

Igor-Teleport-example.gif

You can download this simple example from this link.

I hope this helps to get you on the right path. Just be aware/cautious that this will teleport whatever actor is nearest the effect, which could possibly be an AI...

On a side note, one of the major weakness (IMO) of Igor and the GR script system is that there are only a few triggers that allow you to know who/what triggered them. Most of the time you need to use things like "Get nearest actor to XXX" to figure out who was close to something. personally, I have found it very frustrating that you can not tell who placed a demo charge, only that it was placed.

Edited by Buehgler_AS
Link to comment
Share on other sites

  • 1 year later...

Just wanted to put my 2 cents in, this worked great, here's my example:

Group: Secret Door

Comment:

Player thru Secret Door

Trigger Event:

A member of Player Platoon is within 2 meter(s) of Door Teleport.

Responses:

Allow this block to be reactivated.

Teleport (The actor nearest Door Teleport) to Secret Door - Inside.

SeekerII

aka Stormlord

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.

 Share

×
×
  • Create New...