Warning: include(/var/www/html/forum/Sources/../../../includes/depot_files/OFPEC_get_header_image.inc.php): failed to open stream: No such file or directory in /var/www/html/forum/Sources/Load.php(2272) : eval()'d code on line 146

Warning: include(): Failed opening '/var/www/html/forum/Sources/../../../includes/depot_files/OFPEC_get_header_image.inc.php' for inclusion (include_path='.:/usr/local/lib/php') in /var/www/html/forum/Sources/Load.php(2272) : eval()'d code on line 146

Notice: Undefined index: OFPEC in /var/www/html/forum/Sources/Load.php(2272) : eval()'d code on line 152

Notice: Trying to access array offset on value of type null in /var/www/html/forum/Sources/Load.php(2272) : eval()'d code on line 152

Notice: Trying to access array offset on value of type null in /var/www/html/forum/Sources/Load.php(2272) : eval()'d code on line 152
    Home   Help Login Register  

Author Topic: Respawns  (Read 2976 times)

0 Members and 2 Guests are viewing this topic.

Offline Evan Scown

  • Members
  • *
Respawns
« on: 27 Sep 2006, 02:52:28 »
Hello,

I'm making a training map for the clan I'm in and I've set up a rather noice little loadout script...for example, the AIs at the base who are really just novalty troops start out with a certain loadout and hat colour *using the UKF mod*. What I'm wanting to do is that when a person dies I can get them to respawn at the base with different loadouts, so say if they started out with loadout and hat colour "X" then when they respawn they would start with loadout and hat colour "X".

Offline Evan Scown

  • Members
  • *
Re: Respawns
« Reply #1 on: 27 Sep 2006, 02:54:08 »
I figure it has something to do with event handler... and that *look bellow* stuff...but It took me ages just to work out how to do that # stuff in the scripts, lol.

_type = blah goto "X"

#X
blah
blah
blah

Offline Seven

  • Members
  • *
  • Am I a llama?
Re: Respawns
« Reply #2 on: 27 Sep 2006, 05:11:40 »
First make a marker on the map called respawn_west; make it type elipse & whatever size you want it to be; respawning will hapen within that marker.

ad a file called description.ext to ur mission folder and in it put the text:
Code: [Select]
respawn=3
respawndelay=30

in the init field of ur soldier put
Code: [Select]
this addeventhandler ["killed",{ _this exec "unitkilled.sqs"}]

the unitkilled.sqs
Code: [Select]
_soldier = _this select 0
@alive _soldier
_soldier setObjectTexture [16,"\ukf_textuk\berets\paraberet.pac"];
_soldier setObjectTexture [17,"\ukf_textuk\berets\paraberet1.pac"];
_soldier addmagazine "whatevermagzuneed"
_soldier addmagazine "whatevermagzuneed"
_soldier addmagazine "whatevermagzuneed"
_soldier addmagazine "whatevermagzuneed"
_soldier addmagazine "whatevermagzuneed"
_soldier addweapon "correspondendingweapon"
_soldier selectweapon "correspondendingweapon"

dunno if this is all correct it's pretty late here now, but if not let it know I'm sure someone else will help out!
Greetz :zzz:
« Last Edit: 27 Sep 2006, 10:32:41 by Seven »

Offline Evan Scown

  • Members
  • *
Re: Respawns
« Reply #3 on: 28 Sep 2006, 22:41:55 »
Edit: Hmm...there's something that must be the issue...cause the custom loadout doesn't want to work
« Last Edit: 29 Sep 2006, 01:06:04 by Evan Scown »

Offline Seven

  • Members
  • *
  • Am I a llama?
Re: Respawns
« Reply #4 on: 29 Sep 2006, 02:18:04 »
I hope the loadout works the first time you respawn;
if so the prob would be the eventhandler that wasn't added each respawn?
Code: [Select]
_soldier = _this select 0
@alive _soldier
_soldier addeventhandler ["killed",{ _this exec "unitkilled.sqs"}]
_soldier setObjectTexture [16,"\ukf_textuk\berets\paraberet.pac"];
_soldier setObjectTexture [17,"\ukf_textuk\berets\paraberet1.pac"];
_soldier addmagazine "whatevermagzuneed"
_soldier addmagazine "whatevermagzuneed"
_soldier addmagazine "whatevermagzuneed"
_soldier addmagazine "whatevermagzuneed"
_soldier addmagazine "whatevermagzuneed"
_soldier addweapon "correspondendingweapon"
_soldier selectweapon "correspondendingweapon"
as for the objecttexture I just took some random thing I found for those units