ubiqvisuals

Login Form




Ubiq Visuals Forum
Welcome, Guest
Please Login or Register.    Lost Password?
No corpse removal? (1 viewing) (1) Guest
Go to bottom Favoured: 0
TOPIC: No corpse removal?
#565
No corpse removal? 2 Years, 9 Months ago  
So corpse removal seems to be broken, I have tried everything to call delete or ondisabled to attempt to get rid of the killed ai, however it just will not go away. I have the ai set up to damage the player on collision, so you can see how this could be a problem.

Any help with this would be greatly appreciated.
 
Logged Logged  
  The administrator has disabled public write access.
#567
lornem ()
Ubiq Visuals
User Offline Click here to see the profile of this user
Gender: Male lorneswork.com Location: Vancouver
Re:No corpse removal? 2 Years, 9 Months ago  
Hi Tannayr,

Yes, we've changed the way player death is handled in the 3DAAK. The default T3D behavior is to schedule the old player object to be deleted in a few seconds, and spawn a new player object when clicked. Instead we wanted the player to lay there (forever) until the player clicks a button, at which point the most recent checkpoint save is loaded and the *same* player object is returned to that checkpoint location with the appropriate health etc.

To get the default behavior back you'll need to:

  1. add the following lines to DefaultPlayerData::onDisabled() in \game\scripts\server\player.cs:
    Code:


    // Schedule corpse removal. Just keeping the place clean.
    %obj.schedule(22000 - 1000, "startFade", 1000, 0, true);
    %obj.schedule(22000, "delete");



  2. in the same file, delete everything from DefaultPlayerData::onTrigger()


I haven't tested this extensively, but the corpse will at least fade and delete after 22 seconds. Let me know if you're still having trouble.

Lorne
 
Logged Logged  
 
Last Edit: 2010/08/21 00:53 By lornem.
  The administrator has disabled public write access.
#568
lornem ()
Ubiq Visuals
User Offline Click here to see the profile of this user
Gender: Male lorneswork.com Location: Vancouver
Re:No corpse removal? 2 Years, 9 Months ago  
I just noticed you mentioned AI. This might be further complicating things. The above solution works for the player, but I can't guarantee anything for the AI. The AI might be using a different datablock...
 
Logged Logged  
  The administrator has disabled public write access.
#572
Re:No corpse removal? 2 Years, 9 Months ago  
yeah, unfortunately that does not work for the AI, however all I did for my ai was make a copy of player.cs rename it playerai.cs and change playerbody to playerbodyai then set the ai to use playerbodyai. So technically it should work, unless something else was changed or removed somewhere for the kit. Honestly it seems like ondisabled is not being called for AI.
 
Logged Logged  
  The administrator has disabled public write access.
#574
lornem ()
Ubiq Visuals
User Offline Click here to see the profile of this user
Gender: Male lorneswork.com Location: Vancouver
Re:No corpse removal? 2 Years, 9 Months ago  
Hmm, I can't think of any reason why the player would be treated differently from the AIs if they both use the same C++ class.

Does onDisabled() work if you use the same player datablock for the AIs? (in your case "playerbody")

Lorne
 
Logged Logged  
  The administrator has disabled public write access.
#577
Re:No corpse removal? 2 Years, 8 Months ago  
I actually got this to work, by completely rewriting the AI datablocks. It seems that the playerbody onDisabled was tied to a trigger, and I was having trouble calling it for the AI through scripts, maybe due to my own scripting limitations.
 
Logged Logged  
  The administrator has disabled public write access.
Go to top