Home   Help Search Login Register  

Author Topic: Complete nubcake respawn  (Read 1789 times)

0 Members and 1 Guest are viewing this topic.

Offline Smooth Operator

  • Members
  • *
Complete nubcake respawn
« on: 03 Mar 2007, 11:31:54 »
greets!
ive been on this website all day looking at tutorials and posts and now i'm finally stuck. just a little background on me, today was the first day for me to ever open the mission editor making me a complete nubcake. im stuck on this respawn script that i found in the respawn tutorial. what im trying to do is make a deathmatch map with 5 playable civilians, each having a unique specific respawn location. the only thing i can decipher from the tutorial is how to randomize respawn locations out of a specified number. ive created 5 playable civilians named p1-p5 and 3x3 ellipse markers named p1_respawn-p5_respawn, but i dont know how to assign p1 to spawn at p1_respawn. any advice?

thanks in advance

also: what would be the best way to eliminate "xxx killed xxx, friendly fire"
« Last Edit: 03 Mar 2007, 12:17:57 by Smooth Operator »

Offline Cheetah

  • Former Staff
  • ****
Re: Complete nubcake respawn
« Reply #1 on: 03 Mar 2007, 11:38:49 »
Don't know how to solve that respawn issue, I'm not good at MP scripting so I'll leave that open for someone else. The radio stuff might be fixed by using: enableRadio false;

Tested and works for me if I put down a few civilians, one of them is the player (me) and one BLUFOR soldier with the health slider set to the left. In a trigger with Condition: true; I put the command (enableRadio false) and they don't shout when I hit or kill them.
Like missions? Help with Beta Testing! or take a look at the OFPEC Missions Depot for reviewed missions!

Offline Smooth Operator

  • Members
  • *
Re: Complete nubcake respawn
« Reply #2 on: 03 Mar 2007, 11:55:39 »
sweet, fix the radio thing. a little update on where im stuck. in the tutorial it says:

Create a marker for it, calling it ****_respawn
in the following example this is called "rescue_respawn"

which i'm assuming means create p1_respawn, p2_respawn...etc etc. which ive done
And then a trigger for each player that is required to respawn at this other location.
this is where im stuck..what the hell do i do with this?

In this example, player is called "RP5"

class Item19
{
     position[]={8673.614258,6.824206,12584.245117};
        a=0.000000;
        b=0.000000;
        repeating=1;
        age="UNKNOWN";
        text="RP5 respawn trigger";
        name="RP5_Respawn_";
        expCond="alive RP5";
        expActiv="[RP5, ""rescue_respawn""] exec ""rescue_respawn.sqs""";
        class Effects{};
};


ive created a rescue_respawn.sqs in the users\x\missions\mymission directory with the following code:
Code: [Select]
; rescue_respawn.sqs
; Script that respawns players in a specific zone.
; Simplified from Backoff's multiple respawn script.
;
; Syntax: [player name, respawn marker name] exec "respawn_rescue.sqs"
;
; "Player name" is the name given to the player.
; "respawn marker name" is the name of the respawn marker the player
; should respawn in.
;
; Example: [Rescue1, "rescuers_area"] exec "respawn_rescue.sqs"
;

_player = _this select 0
_zone = _this select 1
_radius = 10

_pos = getMarkerPos _zone

; Create random number to set the player position

_randx = random (_radius)
? ( random(10) < 5 ): _randx = _randx * -1
_randy = random(_radius)
? ( random(10) < 5 ): _randy = _randy * -1

; Set the position

_player setpos [(_pos select 0) + _randx, (_pos select 1) + _randy, 0]

Exit

so now i just need to know what to do with the triggers (i think?) or do i need to create a description.ext file in addition to this? god i feel like such a nub. thanks again in advance.
« Last Edit: 03 Mar 2007, 12:21:05 by Smooth Operator »

Offline Cheetah

  • Former Staff
  • ****
Re: Complete nubcake respawn
« Reply #3 on: 03 Mar 2007, 13:10:13 »
Press F3 and double click somewhere on the map to create a trigger. Check the attached image for the values of your trigger.
Once p1 gets killed the respawn script will be activated. Make sure though that the script is in the mission folder.

Yes in order to let your men respawn you have to create a description.ext file with the respawn=x command. Check this page on the Biki.
Like missions? Help with Beta Testing! or take a look at the OFPEC Missions Depot for reviewed missions!

Offline Smooth Operator

  • Members
  • *
Re: Complete nubcake respawn
« Reply #4 on: 03 Mar 2007, 13:56:39 »
thanks for the fast responses.
i did exactly as you said and created the triggers. when i loaded the map on multiplayer i got some error about a zero divisor. so i changed the activation to "[pn, pn_respawn] exec "rescue_respawn.sqs"; per the instructions when referring to the "syntax", and added a description.ext to the mission folder.... i used the respawn=2 and i respawn in the place i died....so still no luck with the script... is the condition "!(alive pn)" ? hard to see if that is a ! or not in the picture.

Offline Inkompetent

  • Members
  • *
Re: Complete nubcake respawn
« Reply #5 on: 03 Mar 2007, 18:31:40 »
Yes, it says "!(alive pn). It is a way to write boolean functions and it means "NOT (alive pn)".