I know the answer could be "duh, the creature is dead." , but I've got to ask anyway.
If I add a SendMessageToPC(oPC, "OOh I'm dead..")); on a creatures OnDeath script, I see the message.
But if I add a
DelayCommand(5.00, SendMessageToPC(oPC, "5 sec delay ends now ..")); on the creatures, I don't see it.
What is a way around this, as I would like to set a variable on a waypoint 5min after the creature dies and planned on doing this from the OnDeath of the creature.
ideas?
DelayCommand on Dead Creature.
Débuté par
Buddywarrior
, févr. 07 2011 10:15
#1
Posté 07 février 2011 - 10:15
#2
Posté 07 février 2011 - 10:20
Make sure the creature does not fade after its death so the script can still fire.
FP!
FP!
#3
Posté 07 février 2011 - 11:17
Looks like that fixed it.. Thanks a ton!
#4
Posté 09 février 2011 - 10:21
I suggest you use AssignCommand to assign the DelayCommand to the module.
AssignCommand(GetModule(),DelayCommand(5.00,SendMessageToPC(oPC,"5 sec delay ends now")));
An alternative is to assign the delayed command to a (possibly invisible) placeable object, or even to the waypoint where you want the variable to be set (although I'm not certain waypoints will run commands - I know the module does).
AssignCommand(GetModule(),DelayCommand(5.00,SendMessageToPC(oPC,"5 sec delay ends now")));
An alternative is to assign the delayed command to a (possibly invisible) placeable object, or even to the waypoint where you want the variable to be set (although I'm not certain waypoints will run commands - I know the module does).
#5
Posté 09 février 2011 - 11:06
If you are planning on using the 'relay' method posted above, it is often a good idea to either
1. Assign the Command to the Module
or
2. Assign the Command to a High AI Level NPC. AI Level affects priority to a 'n' degree, which might help keep accuracy with DelayCommand actions.
I wouldnt recommend assigning commands to the placeables - in large modules, Placeables get a very low priority as far as Bioware Scripting goes. Even Shayan's Subrace Engine 3.x (the subrace clock) fails to work in Modules that are massive, because the Subrace Clock placeable, is unable to fire off its script at the right time. (without using Pseudo-HB's)
Having a Single NPC with a Maximum AI Level set, in an area that is unaccessible, and assigning all your action/commands through them, would be able to accomplish what you need.
I use a similar method for Server Anouncments.
a Function that does
void MakeServerAnnouncement(string sName, string sMessage);
sName - The Function does a 'SetName' call on the Announcer npc, to make them have whatever name I want.
sMessage - Is Shouted after a 0.5 second Delay - (to allow the SetName to take effect)
1. Assign the Command to the Module
or
2. Assign the Command to a High AI Level NPC. AI Level affects priority to a 'n' degree, which might help keep accuracy with DelayCommand actions.
I wouldnt recommend assigning commands to the placeables - in large modules, Placeables get a very low priority as far as Bioware Scripting goes. Even Shayan's Subrace Engine 3.x (the subrace clock) fails to work in Modules that are massive, because the Subrace Clock placeable, is unable to fire off its script at the right time. (without using Pseudo-HB's)
Having a Single NPC with a Maximum AI Level set, in an area that is unaccessible, and assigning all your action/commands through them, would be able to accomplish what you need.
I use a similar method for Server Anouncments.
a Function that does
void MakeServerAnnouncement(string sName, string sMessage);
sName - The Function does a 'SetName' call on the Announcer npc, to make them have whatever name I want.
sMessage - Is Shouted after a 0.5 second Delay - (to allow the SetName to take effect)
#6
Posté 09 février 2011 - 12:46
I always Assign to the area the Object is in.
That way I Don't have to create anything new.
That way I Don't have to create anything new.
#7
Posté 09 février 2011 - 01:26
True
Areas and Modules have the highest Priority as far as I know - so they are 'almost' guarantee'd to fire when you want/need them.
My example of using a Relay NPC is useful for cases of Shout Messages, because as far as I know, you cant use SetName on the Module or Areas, so changing the name that appears as the 'Shouter' doesnt work.
Areas and Modules have the highest Priority as far as I know - so they are 'almost' guarantee'd to fire when you want/need them.
My example of using a Relay NPC is useful for cases of Shout Messages, because as far as I know, you cant use SetName on the Module or Areas, so changing the name that appears as the 'Shouter' doesnt work.





Retour en haut







