This works without errors
ActorCreate(null, "Beam", "ColossusAttackBeam", "::global.Launch", "::global.Impact");
Which looks as if it creates a Colossus Attack Beam actor and works without error but I don't know where to go from here
What do you mean with working without errors? Just that is doesn't give compile errors when saving?
Also, where'd you get the idea to use ::global as coordinates? Actually I don't really know how one would go about chaning these global scope variables..
@s3rius:
No Errors but no visibility
Edit:
So far this is what I have
ActorRefSet(null, "::global.Launch", libNtve_gf_MainActorofUnit(EventUnit()));
ActorRefSet(null, "::global.Impact", libNtve_gf_MainActorofUnit(EventUnitTargetUnit()));
ActorCreate(null, "Beam", "ColossusAttackBeam", "::global.Launch", "::global.Impact");
ActorSend(libNtve_gf_ActorLastCreated(), libNtve_gf_SetVisibility(true));
It compiles and does not create errors in game but I get no beam (this is in a TriggerAddEventUnitAbility trigger)
I'm not sure exactly what you're trying to do, but this is a way to create a trigger to send a beam between 2 units:
Create an effect of the type "Create persistent" with a long duration. Set "Target - location +" to "Target Unit/Point" and "Target - location location offset end +" to "Target Unit/Point".
Create an actor of type "Beam (Simple)" based on "Beam Simple Animation Style Continuous". Set the model to whatever beam you want to use. In effects plus you need four extra events. Make two with event "Effect.<name of your persistent>.Start". The first should be just "Create", the second "Animation Play" and then whichever animation you want to use for the beam. The other two events are "Effect.<name of your persistent>.Stop" events. The first you be "Destroy" and the second "Animation Clear", set to clear the animation you chose.
Finally within your trigger make a "Create Effect On Unit (From Unit)" event, with the caster set to where you want the beam to come from and the target where you want the beam to go to.
@Demolion:
Could you please look at my map to see what I did wrong? The end result I want is to create the beam and have the ability to get access to the actor so I can destroy it and change it's color.
Edit:
I just realized that if I used this method I still can't get access to the actor.....
I'm not entirely sure about everything that wasn't working, but I ended up copying the actor from the map I'm making and tweaking a couple of other bits and it now works. There's some superfluous stuff you should probably get rid of as well.
As an aside, it's "persistent", not "persistant" ;p
The actor is called "Power Tree Beam". Assuming you're trying to clone power tower's different model for different transfer rates, I'd advise using several different persistent/actor pairs with the different models you need. You'll also need remove persistent effects to get rid of the old beams (I'm not sure which end they should be targeted at) when you replace them.
What do you mean with working without errors? Just that is doesn't give compile errors when saving?
Also, where'd you get the idea to use ::global as coordinates? Actually I don't really know how one would go about chaning these global scope variables..
What do you want to do now? / What do you need help with?
I can't try anything right now, but see if you can use this function to pass the positions instead of ::global
PS: This might also be something:
This could maybe be used to specify the ::variables?
PPS: Yea that pretty much looks like it. This is specified in the TestNatives right before the Collossus beam is created.
@waterfoul: Go
I'm not sure exactly what you're trying to do, but this is a way to create a trigger to send a beam between 2 units:
Create an effect of the type "Create persistent" with a long duration. Set "Target - location +" to "Target Unit/Point" and "Target - location location offset end +" to "Target Unit/Point".
Create an actor of type "Beam (Simple)" based on "Beam Simple Animation Style Continuous". Set the model to whatever beam you want to use. In effects plus you need four extra events. Make two with event "Effect.<name of your persistent>.Start". The first should be just "Create", the second "Animation Play" and then whichever animation you want to use for the beam. The other two events are "Effect.<name of your persistent>.Stop" events. The first you be "Destroy" and the second "Animation Clear", set to clear the animation you chose.
Finally within your trigger make a "Create Effect On Unit (From Unit)" event, with the caster set to where you want the beam to come from and the target where you want the beam to go to.
@waterfoul: Go
I'm not entirely sure about everything that wasn't working, but I ended up copying the actor from the map I'm making and tweaking a couple of other bits and it now works. There's some superfluous stuff you should probably get rid of as well.
As an aside, it's "persistent", not "persistant" ;p
@waterfoul: Go
That would be because I uploaded the wrong version I think.
@waterfoul: Go
The actor is called "Power Tree Beam". Assuming you're trying to clone power tower's different model for different transfer rates, I'd advise using several different persistent/actor pairs with the different models you need. You'll also need remove persistent effects to get rid of the old beams (I'm not sure which end they should be targeted at) when you replace them.