ActionCreate(string, location)
Used to encapsulate CreateObject allowing this function to be added to the action stack.
void ActionCreate( string sCreature, location lLoc );
Contents |
[edit] Parameters
- sCreature
- The resref of the creature to create
- lLoc
- The location to create the creature
[edit] Description
This function essentially wraps the CreateObject function in a void method so that it can be placed on the action queue. It is used in the OnHeartbeat of the placable object "Skeleton Bones" found in the Battlefield palette.
[edit] Remarks
nw_o2_skeleton.nss might be a good place to start if you wanted objects to turn into creatures when the player approached.
nw_o2_skeleton cannot be included in a script that has a "void main()" function definition. This is because "nw_o2_skeleton" defines a "void main()" function. If you want to use this function, make a copy from "nw_o2_skeleton" into your own script.
Note that this function can only create creatures. A more versatile function is CreateObjectVoid.
[edit] Requirements
#include "nw_o2_skeleton"
[edit] Version
1.28
[edit] Example
string sCreature = "NW_SKELWARR01"; location lLoc = GetLocation(OBJECT_SELF); DelayCommand(0.3, ActionCreate(sCreature, lLoc)); // The DelayCommand message above could be replaced with // ActionDoCommand(ActionCreate(sCreature, lLoc));
[edit] See Also
functions: | CreateObject |
events: | OnHeartbeat Event |
author: Michael Nork, editor: Charles Feduke, additional contributor(s): Albert Valls Rovira