Home   Help Search Login Register  

Author Topic: DisableAI=true and JIP.  (Read 3401 times)

0 Members and 1 Guest are viewing this topic.

Offline D.murphy man

  • Members
  • *
  • I'm a llama!
DisableAI=true and JIP.
« on: 18 Jul 2008, 08:46:41 »
I was just wondering what peoples experiences are when using DisableAI=true in the description.ext of their MP missions. From what i have seen and experimented with seems to confirm that players CAN still JIP into playable slots even when DisableAI=true, and as such i have included it in one my recent missions Quarantine. However i am having reports of several players that, although they can JIP, occasionally they'll spawn as seagulls! So i am asking weather any one else has had this problem with there missions and how they fixed it/worked around it?

For my mission i do not want to AI to be hanging around after players disconnect and when players reconnect to a previous played slot they end up in last location the character was left at when last player played. I was hoping to fix this by using DisableAI so when players disconnect the AI is removed, then when they connect again players respawned fresh from the spawn point again, but like mentioned this does not seem to be the case 100% of the time.

Also interesting to note that the BIS wiki claims that DisableAI=true will disable JIP completely, this however does not seem to be the case.

So guys, any thoughts or ideas?

Cheers,
     Murphy.

Offline drbobcat

  • Members
  • *
  • Rawr
Re: DisableAI=true and JIP.
« Reply #1 on: 18 Jul 2008, 12:15:35 »
I too noticed that DisableAI=1 and JiP are compatible.  However, it seems that you must have respawn enabled or else the joining players will end up being seagulls once they've completely loaded the mission.  So, make sure you take that into consideration!

- dRb

Offline D.murphy man

  • Members
  • *
  • I'm a llama!
Re: DisableAI=true and JIP.
« Reply #2 on: 18 Jul 2008, 13:23:24 »
I have indeed got respawn enabled. But the same problem still occurs, i am not entirely sure under what circumstances it happens (people have been pretty vague about it with feedback to me) but it appears to just be pretty random. Heres a copy of my description.ext if any ones interested:
Quote
#include "SPON\Core\ui\common.hpp"
#include "SPON\Money\ui\shop.hpp"
#include "SPON\Money\ui\bank.hpp"
OnLoadMission = "Quarantine.";
Respawn = "BASE";
RespawnDelay = 10;
respawnVehicleDelay = 30;
disabledAI = 1
titleParam1 = "View Distance & Radiation on/off";
valuesParam1[] = {300,600,1000,1500,301,601,1001,1501};
defValueParam1 = 600;
textsParam1[] = {"300m,Rad.on","600m,Rad.on(Default)","1000m,Rad.on","1500m,Rad.on","300m,Rad.off","600m,Rad.off","1000m,Rad.off","1500m,Rad.off"};

titleParam2 = "Starting bank balance";
valuesParam2[] = {1000,5000,10000,100000};
defValueParam2 = 5000;
textsParam2[] = {"£1000","£5000(Defualt)","£10k","£100k"};

class CfgSounds
{
   // List of sounds (.ogg files without the .ogg extension)
   sounds[] = {GeigerHighAlarm, GeigerLow, GeigerMedium};

   // Definition for each sound
   class GeigerHighAlarm
   {
      name = "GeigerHighAlarm";
      sound[] = {\sound\GeigerHighAlarm.ogg, db + 0, 1.0};
      titles[] = {0, ""};
   };
   class GeigerLow
   {
      name = "GeigerLow";
      sound[] = {\sound\GeigerLow.ogg, db + 0, 1.0};
      titles[] = {0, ""};
   };
   class GeigerMedium
   {
      name = "GeigerMedium";
      sound[] = {\sound\GeigerMedium.ogg, db + 0, 1.0};
      titles[] = {0, ""};
   };
};

Offline Garcia

  • Members
  • *
  • Leeds United is the best football team...EVER!
Re: DisableAI=true and JIP.
« Reply #3 on: 30 Jul 2008, 02:41:53 »
For my mission i do not want to AI to be hanging around after players disconnect and when players reconnect to a previous played slot they end up in last location the character was left at when last player played. I was hoping to fix this by using DisableAI so when players disconnect the AI is removed, then when they connect again players respawned fresh from the spawn point again, but like mentioned this does not seem to be the case 100% of the time.

Unless BIS changed this from OFP to ArmA, disableAI will only remove AI when you start the mission. So if you have 4 players and one disconnects, the AI left after him will still hang around. Or have they changed this?

Offline D.murphy man

  • Members
  • *
  • I'm a llama!
Re: DisableAI=true and JIP.
« Reply #4 on: 30 Jul 2008, 03:04:03 »
Well when i was testing, id move away from the respawn point, disconnect, then reconnect to the last slot i occupied and i was respawned back at the spawn point. So i guessed the AI was deleted after you disconnect,however it could be the case that the AI is left there and only deleted and respawned when another player connects. But from iv seen in other MP missions is as soon as some one disconnects there deleted also. (if disableAI=true and has respawn base)

Im not entirely sure how it all works, maybe some one with more experience with using respawn_base, disableAI, and JIP could give insight?

Offline TheCaptain

  • Members
  • *
  • You and The Captain Can Make it Happen
Re: DisableAI=true and JIP.
« Reply #5 on: 07 Aug 2008, 01:30:14 »
DisabledAI does 'kill' the player in a slot when they disconnect, and a new player will respawn at base if respawn is enabled. If you have no respawn, I think they do indeed spawn as a seagull.

If you have two machines, you can watch the original player 'die' when they disconnect, and reappear at spawn when they reconnect.

Not quite sure what the bug you're having is. In my experience when you reconnect you always end up respawning at base, never at a seagull.
The Captain

Offline D.murphy man

  • Members
  • *
  • I'm a llama!
Re: DisableAI=true and JIP.
« Reply #6 on: 07 Aug 2008, 13:08:44 »
Well i have now released the latest version of my mission any way. I think it could of been something to do with way i was deleting units and such from players groups. It could of deleted a players unit and group if the player happen to of disconnected at the same time they where being deleted. I had to change the way things where deleted for other reasons any way but now it wont delete the players unit or group even if the players unit is AI controlled. So fingers crossed this is what was causing the problem and it wont crop up again.

I think the subject needs a little more investigating thou, so other mission makers know possible problems and how to avoid them.

Offline D007

  • Members
  • *
Re: DisableAI=true and JIP.
« Reply #7 on: 09 Aug 2008, 23:12:39 »
Heya Murph, My bro just mentioned to me you were looking into the jip issue.. yea it's a pain.. I just did disableai=false
then put em out of harms way at respawn.

I just started thinking about it more though.
and the difference between ai and players in regards to being on the map is..
You can delete an ai body but leave ai's enabled..
and you can't delete a players body..

I believe that by setting desableai=false,
then deleting ai's bodies names man1-12. you might be able to solve the problem.. I'll see if i can look into it.
Maybe on a trigger set to every 20 mins or so..just execute a delete man1,man2,man3 etc to12..
you can't delete a player, so only the ones who are ai's will disappear.

It might trick the game into acting as if the ai's are still forced on. because they are.
hopefully that will negate the seagull problem.
and the extra bodies problem.

Oh murphy, to partially fix the issue your having in quarantine. Take out the names of the players in the individual players init lines.. you cant have man2 punish himself with the killed event apon death, or he will get himself executed every time he dies. Even if he kills himself, is killed by something else, or respawns. lol..

Me and my bro David.B have pretty good understanding of it now a days XD..That works to an extent anyway.
But if i recall that issue crept back up later anyway.
But it's something to look into.

If you figure out a way to remove the dead players bodies please do let us know..
It's a show stopper..
that kind of issue will lag a server to death..

I'm Bishop btw.. but the name was taken.. Go figure.. >
« Last Edit: 09 Aug 2008, 23:19:30 by D007 »

Offline ModestNovice

  • Members
  • *
Re: DisableAI=true and JIP.
« Reply #8 on: 11 Aug 2008, 02:02:05 »
disabledai works fine in my mission. What I did to delete dead bodies is a trigger.

condition: !alive Cop1
OnAct: hidebody Cop1
"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: DisableAI=true and JIP.
« Reply #9 on: 11 Aug 2008, 11:06:32 »
You created a separate trigger for every player slot? That is not only cumbersome to set up, but will produce unnecessary lag.

Please consider using a simple killed handler instead (and remember that you can just use player rather than referring to absolutely every player object separately):
Code: (init.sqf) [Select]
waitUntil { alive player };
player addEventHandler ["KILLED", { [_this select 0] spawn { hidebody (_this select 0); } }];

(The reason I hide the body inside a spawned block is so that all other KILLED handlers still have access to the corpse object; if you delete it right away, then other handlers might get sent nullObj as the person who died. You could also add a sleep before hiding too, but then you wouldn't hide if the player disconnected immediately after dying).

EDIT: Added wait for alive player, since although this was implied, some people might not realise it is needed in MP.
« Last Edit: 13 Aug 2008, 11:48:52 by Spooner »
[Arma 2] CBA: Community Base Addons
[Arma 1] SPON Core (including links to my other scripts)

Offline ModestNovice

  • Members
  • *
Re: DisableAI=true and JIP.
« Reply #10 on: 13 Aug 2008, 02:33:25 »
well, Spooner, I  can not get alot working proper in MP, triggers worked all the time though for me, regardless of when someone joined or disconnected.

"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 D007

  • Members
  • *
Re: DisableAI=true and JIP.
« Reply #11 on: 06 Sep 2008, 23:40:22 »
yea we have removing dead bodies under control now..
thing is the zombie script seems to try to take ownership of the bodies.. if you try to delete them while they are in the zone with the zombies you'll get an error..
We figured to just teleport the players apon death to a cutscene about 10 seconds after death.. then the CS happens and you go into a hidebody animation. just one trigger at not alive player for that, with a wait then hidebody.
But removing the corpse from the spawn zone then burying it will negate that error.
has so far anyway. :)

Offline D007

  • Members
  • *
Re: DisableAI=true and JIP.
« Reply #12 on: 25 Sep 2008, 21:09:27 »
Decided to try Spons method for hiding bodies... seagull issue popped up again mysteriously.
Will tell ya how it goes.. but it seems to work from the tests I've done so far.. waits for the player to die.. then hides the body.
just don't know how its going to act on the server yet during MP.