Killing & respawning 'dusteffect' objects via Lua? [Solved]
Posted: Wed Jun 11, 2014 5:00 pm
Does anybody know of a way to kill and respawn a 'dusteffect' object via Lua? If not, what about moving the object to a path node? I've tried to use KillObject, RespawnObject, DeleteEntity, and SetEntityMatrix but all of them seem to output the same exact results:
I've also tried using various combinations of the four aforementioned callbacks with various callbacks such as GetObjectPtr, GetEntityPtr, GetEntityName, GetEntityClass, etc., but all have output those same, exact results.
The objects in Zero Editor are named "lvlution_oxygen1", "lvlution_oxygen2", "lvlution_oxygen3", "lvlution_oxygen4", and "lvlution_oxygen5".
What I basically need to have happen is for the objects' dust effects be invisible through any means necessary, but then they need to be able to become visible again later in the match, and then become visible again.
Examples of what I've tried:
I already have all of my timers set up and I know they work and all because the rest of my secret special concepts work perfectly fine with them, but this does not and it needs to.
Anyone have any ideas?
Code: Select all
Message Severity: 2
C:\Battlefront2\main\Battlefront2\Source\LuaCallbacks_Mission.cpp(635)
Entity "lvlution_oxygen1" not found
Message Severity: 2
C:\Battlefront2\main\Battlefront2\Source\LuaCallbacks_Mission.cpp(635)
Entity "lvlution_oxygen2" not found
Message Severity: 2
C:\Battlefront2\main\Battlefront2\Source\LuaCallbacks_Mission.cpp(635)
Entity "lvlution_oxygen3" not found
Message Severity: 2
C:\Battlefront2\main\Battlefront2\Source\LuaCallbacks_Mission.cpp(635)
Entity "lvlution_oxygen4" not found
Message Severity: 2
C:\Battlefront2\main\Battlefront2\Source\LuaCallbacks_Mission.cpp(635)
Entity "lvlution_oxygen5" not foundThe objects in Zero Editor are named "lvlution_oxygen1", "lvlution_oxygen2", "lvlution_oxygen3", "lvlution_oxygen4", and "lvlution_oxygen5".
What I basically need to have happen is for the objects' dust effects be invisible through any means necessary, but then they need to be able to become visible again later in the match, and then become visible again.
Examples of what I've tried:
Code: Select all
oxygen1Ptr = GetEntityClass("lvlution_oxygen1")
oxygen2Ptr = GetEntityClass("lvlution_oxygen2")
oxygen3Ptr = GetEntityClass("lvlution_oxygen3")
oxygen4Ptr = GetEntityClass("lvlution_oxygen4")
oxygen5Ptr = GetEntityClass("lvlution_oxygen5")
--print("object1Ptr: "..object1Ptr)
Oxygen1Node = GetPathPoint("oxygen_path", 3) -- gets the path point
Oxygen2Node = GetPathPoint("oxygen_path", 0)
Oxygen3Node = GetPathPoint("oxygen_path", 4)
Oxygen4Node = GetPathPoint("oxygen_path", 2)
Oxygen5Node = GetPathPoint("oxygen_path", 1)
OxygenDummyNode = GetPathPoint("oxygen_path", 5)
SetEntityMatrix( oxygen1Ptr, OxygenDummyNode ) -- hide Levolution oxygen vacuum pfx
SetEntityMatrix( oxygen2Ptr, OxygenDummyNode )
SetEntityMatrix( oxygen3Ptr, OxygenDummyNode )
SetEntityMatrix( oxygen4Ptr, OxygenDummyNode )
SetEntityMatrix( oxygen5Ptr, OxygenDummyNode )Code: Select all
KillObject(oxygen1Ptr)
KillObject(oxygen2Ptr)
KillObject(oxygen3Ptr)
KillObject(oxygen4Ptr)
KillObject(oxygen5Ptr)Code: Select all
DeleteEntity("lvlution_oxygen1")
DeleteEntity("lvlution_oxygen2")
DeleteEntity("lvlution_oxygen3")
DeleteEntity("lvlution_oxygen4")
DeleteEntity("lvlution_oxygen5")Anyone have any ideas?