View Full Version : Simple Block, as an actor
03-24-2007, 08:31 PM
I am trying to use a scripted trigger to spawn and destroy a block. I was thinking of subclassing this staticmesh block under Decorations. How do you get the subclass to point at a certain file? Can you get it to pull something out of mylevel? Or do you have to create a separate package?
EDIT: I've found the 'Staticmeshactor' actor thing, so I think subclassing that would be better. How to I create a subclass of this that points at a certain static mesh?
03-24-2007, 10:24 PM
Your question(s) may need to be clarified further to get better (more) responses.
It sounds like you may be asking about:
- StaticMesh import from a 3D app
- Decoration vs simple StaticMesh (vs Mover) to achieve a destroyable object
- How to do a destroyable object
Any or all of the above apply?
03-24-2007, 10:49 PM
Thanks for the reply. I was just about to come here and say I've found a solution to my problem.
I wanted a Scripted Trigger to Spawn a static mesh, and then destroy it, on command. My static mesh was just a simple block (128*64*128) make in Ued.
I tried to manually subclass my block from static mesh, but I kept getting 'bstatic' errors. I knew the trigger was working, because it was spawning the other stuff i told it to.
I ditched trying to subclass it manually. I added my static mesh into the level, selected it, went into the actor browser, and selected "New from selection". This added a 'pure' subclass to staticmesh. To cure the 'bStatic' crap, I typed "set <class> <variable name> <setting>" as "set blocko bStatic false" into the Ued console.
The effect: I walk into my nice little physics volume, and bang, my static mesh appears.
Next, I want to try to set up a triggeredconditon, so if I walk into the volume, the mesh appears, but it disappears when I step out. Any help with setting up triggeredconditons would be greatly appreciated!
Current problem with triggered conditions:
I've matched the following tags:
Physics Volume -> Events -> Event = blah
Triggered Condition -> Events -> tag = blah
Scripted Trigger -> Action.IFCONDITION -> tag = blah
Triggered Condition -> Triggered Condition -> bEnabled = false
Triggered Condition -> Triggered Condition -> bToggled = false
Triggered Condition -> Triggered Condition -> bTriggerControled = true
Unreal Crashes from a runtime error before even starting.
03-24-2007, 11:40 PM
Also, is there some way I can get a 2 events to fire off for a trigger being triggered and untriggered?
So stepping on Mr Trigger, fires off Event A. And leaving Mr Trigger, fires off Event B.
03-24-2007, 11:41 PM
You can skip the IfCondition altogether. Volumes call events when actors leave them. (I think. You may have to adjust initialstates.) See http://wiki.beyondunreal.com/wiki/PhysicsVolume
By the way, appearing/disappearing block effects like what you're talking about are almost always done with movers. It's a lot easier. You just have to set the movetime to something really low and Key 0 to somewhere in solid geometry.
Powered by vBulletin® Version 4.2.0 Copyright © 2013 vBulletin Solutions, Inc. All rights reserved.