[SOLVED] Model attachment
Topic Locked
Topic Locked
|
Show us more of your triggers please...
you could be going wrong in so many places its unthinkable.Create Model Set Variable1 (crown)= Last Created Model Attach Model to Unit Set Variable2 (unit) = Unit who now has Crown attached Attach Region (crown) to Variable2 (unit) Unit Enters Region Unit Entering is not equal to Variable2 (Unit) Remove Variable1 (crown) Create Model Attach Model to new unit Set Variable1 = last created model Set Variable2 = new unit (crown holder) Should work fine? Don't have the trigger editor open (as you can tell). ![]() ![]() ![]() ![]() ![]() ![]() Gone.
|
|
An artist's depiction of an Extended Unit Death
|
Uh... You can't use (Last created actor) if you haven't created an actor. It's treated as a temporary local variable (I believe). Store that actor in a global variable when you create it and maybe that will fix the removal problem.
I suppose you have already confirmed that this trigger executes when it should? ![]() ![]() ![]() ![]() ![]() ![]() Learn how to make EUDs: [EUD] A Mapmaker's Guide for Creating EPDs
Don't like learning? EUDGen2 Other stuff: Farlap Bound Maker [EUD] EUPCalc SC1 Maps: Dash: 1 2 3 4 5 6 7 8 9 X Jog: Original Warp Other: Super Mario SC Fireball Guard Your Civilian Strength Contest Interceptor Arena |
|
An artist's depiction of an Extended Unit Death
|
Yeah, that's what I've concluded after playing with it a bit.
![]() ![]() ![]() ![]() ![]() ![]() Learn how to make EUDs: [EUD] A Mapmaker's Guide for Creating EPDs
Don't like learning? EUDGen2 Other stuff: Farlap Bound Maker [EUD] EUPCalc SC1 Maps: Dash: 1 2 3 4 5 6 7 8 9 X Jog: Original Warp Other: Super Mario SC Fireball Guard Your Civilian Strength Contest Interceptor Arena |
|
Addicted to SEN Games -Add more!-
|
Well somehow, the "Actor" variable type is a bitch and isn't considered as an Actor itself...
EDIT: Just tested the trigger a bit more. Results: - The region Crown does center on the new unit. - This new unit isn't determined as I wanted: if a unit is created in the region, it is runs the event "Unit enters region", but if the unit is already placed on the map, it doesn't. Only exception: Player 1's Changeling. Somehow, a Player 1 Baneling that I hit with the Crown region centered on my Changeling will not even trigger a "failed condition". - Still can't destroy this goddamn actor. >:O This post was edited 1 time, last edit by payne: Jan 2 2011, 9:12 pm. ![]() ![]() ![]() ![]() ![]() ![]() |
|
Addicted to SEN Games -Add more!-
|
Solved: thanks to Soga!
New trigger: CodeNear Events Unit - Any Unit Enters Crown Local Variables Conditions (Unit type of (Triggering unit)) == Changeling (Zergling) Actions Unit - Remove Thin Torus [49.00, 45.50] from the game Actor - Send message "Destroy Immediate" to actor Crown Variable - Set Crown_Holder = (Triggering unit) Region - Attach Crown to Crown_Holder with offset (Point(0.0, 0.0)) Actor - Attach ShapeThinTorus (Unnamed) to Overhead on Crown_Holder Variable - Set Crown = (Actor for Crown_Holder) General - Pick each integer from 1 to 8, and do (Actions) Actions Variable - Set HasCrown?[(Picked integer)] = false Variable - Set HasCrown?[(Triggering player)] = true Keys: - "Actor - Send message "Destroy Immediate" to actor Crown" - "Variable - Set Crown = (Actor for Crown_Holder)" - "Crown" is an "Actor" type variable ALSO: The Region wasn't big enough to detect if a unit would enter the region, which was kind of another huge bug preventing me from properly testing stuff. XD ![]() ![]() ![]() ![]() ![]() ![]() |