Aller au contenu

Photo

Can you call more than one script per event per object?


  • Veuillez vous connecter pour répondre
5 réponses à ce sujet

#1
M. Rieder

M. Rieder
  • Members
  • 2 530 messages
I know you can write a script that will call multiple scripts, but I was wondering if you could do it from the toolset.

#2
Morbane

Morbane
  • Members
  • 1 883 messages
if you mean in the same slot eg on open run a script then on open again run another script - probably not possible.



but if you want to run a script on onopen and onuse - then i think it is doable - depending on what the scripts do - i do not think a simultaneous script fire will work - one will go first and possibly negating the other.

#3
Shaughn78

Shaughn78
  • Members
  • 637 messages
With certain scripts you can have additional scripts called for.

Death scripts and several others look for a variable string set on the creature and will run that script in addition to the default.

Modifié par Shaughn78, 16 janvier 2011 - 01:09 .


#4
SkywingvL

SkywingvL
  • Members
  • 351 messages
As the others have noted, there is no general mechanism to do this in the game engine. Some of the stock scripts will look for a local on the object that specifies a different script to call; this is how one would typically arrange for this sort of thing to happen.



You should be able to easily write a 'wrapper' script that can call multiple scripts (via ExecuteScript or ExecuteScriptEnhanced) for a particular event if you need this functionality.

#5
M. Rieder

M. Rieder
  • Members
  • 2 530 messages
Ok, all. Thanks for the help.

#6
Shaughn78

Shaughn78
  • Members
  • 637 messages
Another thing to look at is the userdefined scripts. They will need to be activated on spawn, but that is another option that will allow for calling additional scripts.