Home   Help Search Login Register  

Author Topic: Strange Killed Thing...  (Read 1975 times)

0 Members and 1 Guest are viewing this topic.

Offline ModestNovice

  • Members
  • *
Strange Killed Thing...
« on: 28 May 2009, 22:23:36 »
Well, not sure what else I can call this. But its quite annoying.

In my map iv'e got lists (combo boxes that show people who are (!isNull) and alive. But when the people die, it seems to not recognize that the player has respawned is now alive again.

so no the person does not show in the list again.

Now, I have hide the body when they die, and even renamed the repspawning person back their vehicleVarName (like Civ1 renamed to Civ1) and it still doesnt detect that they are alive.

Any ideas?

Thanks,
DaChevs  :-[
"The road became empty and the people disappeared. The clouds ran away; opened up the sky, and one by one I watched every constellation die."
- Sean "Slug" Daley

Offline Spooner

  • Members
  • *
  • Mostly useless
    • Community Base Addons
Re: Strange Killed Thing...
« Reply #1 on: 28 May 2009, 23:47:27 »
Not sure why this is happening, since I haven't a clue how to you are getting the player objects. However, if you take a reference to the

e.g. what is commonly done is this:
Code: (init.sqf) [Select]
// Put all the player objects at the START OF THE MISSION into the global array, 'players'.
players = [p1, p2, p3, p4];
When the first player respawns, then the first element of players array will be first dead (corpse object), then null (corpse disappears). This is because you are recording the initial objects, not the objects as they are when you want to actually use them. Instead you should record them just before you want to use them:
Code: (updateplayerlist.sqf) [Select]
// Put all the player objects, at this VERY MOMENT into the global array, 'players'
players = [p1, p2, p3, p4];

... update the GUI ...

[Arma 2] CBA: Community Base Addons
[Arma 1] SPON Core (including links to my other scripts)

Offline ModestNovice

  • Members
  • *
Re: Strange Killed Thing...
« Reply #2 on: 29 May 2009, 02:17:54 »
yea you were right. Ive fixed it like this:

Code: [Select]
myArray = ["Civ1","Civ2","Civ3",...etc];

if (alive (call compile _x)) then
{
};

Thanks Spooner :)
"The road became empty and the people disappeared. The clouds ran away; opened up the sky, and one by one I watched every constellation die."
- Sean "Slug" Daley

Offline Spooner

  • Members
  • *
  • Mostly useless
    • Community Base Addons
Re: Strange Killed Thing...
« Reply #3 on: 29 May 2009, 02:40:59 »
Yep, that is the other way to do it ;)
[Arma 2] CBA: Community Base Addons
[Arma 1] SPON Core (including links to my other scripts)

Offline Rommel92

  • Members
  • *
Re: Strange Killed Thing...
« Reply #4 on: 29 May 2009, 11:39:17 »
Well that explains some errors a while back...  :whistle: