Ok, I haven't tested this but here's my attempt to solve your problem.
What you want to do is make a button that toggles a boolean variable for a "weapon selection" kind of thing.
Then for your ability, using psi storm for example, find the effect it calls for. In this case it's "Psi Storm (Persistent)." Remember that.
Now for the cursor, find the psi storm "actor splat" actor and edit the event. Add a "actor create > create()" and "actor destroy > destroy()."
Now create a trigger for the dialog item button with a "dialog item is clicked" event. For the actions, do:
-If (dialog item clicked = psi storm button) { if(bool = true) then (set bool = false; destroy splat actor;) else (set bool = true; create splat actor;) }
Now for the trigger of the ability, create a mouse click event with the following actions:
-If (bool = true) then (create "Psi Storm (Persistent)" effect at (mousePosX , mousePosY))
Pardon my messy pseudo code.
Edit:
Ok so I tested it and it works. All except for the cursor splat. Maybe I have the parameters wrong or something. I don't know.
I attached the map.
Man. You are great. If you manage to make the cursor be the same as if I am casting it from a High Templar it would be great. But, anyway great job.
And I noticed that you don't give the actorScope variable any value. Maybe this is the problem. I just don't get the whole scope thing.
Ok so I tested it and it works. All except for the cursor splat. Maybe I have the parameters wrong or something. I don't know.
I attached the map.
Yes, that's what I mean with my last post.
The cursor splat seems to be attached to the cursor by the even abil.XXX.Cursor. Then, and only then, it gets attached to it.
I tried find a different event that you can actually trigger to make the splat show up underneath the cursor, but found none.
I also tried attaching the splat through creation parameters or whatever you could call it - to no avail.
I spend like two hours searching for a way to do so, but I just can't find any.
the one thing i would add to this, and i hope you fine gentlemen find a way to change the mouse cursor splat thing, but on the mouse click even if you use the effect, instead of ability order there are pluses and minuses of doing each way. i may be mistaken but on a map where i used the create effect, the effect would animated one the mosue click and not when the gun animation reached full (i.e. the missile / flame effect would start when the gun was sideways and no wait until the gun was str8 ahead). not a big deal, but little things like that can bother me. then on my current map im using the cast ability, and its set up and waits for the gun / animation to take place at the proper times. maybe you can find a way around this with the effect thing, but id just assume use 'cast ability mouseclickx,mouseclicky etc... the method of changing the mouse youve got is interesting i never thought to try it, though you said the cursor isnt working, but i like that im seeing new / fresh ideas. and sorry if i missed you suggesting it b4 s3rius sometimes you miss things in threads...
Yes, that's what I mean with my last post.
The cursor splat seems to be attached to the cursor by the even abil.XXX.Cursor. Then, and only then, it gets attached to it.
I tried find a different event that you can actually trigger to make the splat show up underneath the cursor, but found none.
I also tried attaching the splat through creation parameters or whatever you could call it - to no avail.
I spend like two hours searching for a way to do so, but I just can't find any.
Yep. Same thing here after trying it myself. I guess you just gotta make an actual unit that has the ability with unlimited range and order it to cast the ability through triggers to get it all nice and pretty. Maybe make the unit have the ability but don't have it on their command card so they can't use it themself?
ive not tried this, i dont like to use dummy units... im stuborn like that. but i coulda sword s3rius talked about this in another thread saying that you cant 'force' and unit to click an abilitiy. so theres no way to simulate if you click a dialog to make a dummy unit click an ability to give the curos splat. i may be wrong as i refuse to use dummy units for things like this anymore, but im pretty sure i remember him already trying that out or whatnot...
The splat doesn't appear when a ability is cast, but when it is "selected". This selection can be done ONLY by the player hitting a spell button and cannot be simulated through triggers in any way (at least in no way I know of - and I already know most of the editor ..). So the only way to make a splat appear is to have a player who clicks on the command-card icon.
Dummy units, spells or whatever won't help there.
The splat doesn't appear when a ability is cast, but when it is "selected". This selection can be done ONLY by the player hitting a spell button and cannot be simulated through triggers in any way (at least in no way I know of - and I already know most of the editor ..). So the only way to make a splat appear is to have a player who clicks on the command-card icon.
Dummy units, spells or whatever won't help there.
You're right. It can't be done. I'll stop persuing this at the moment.
Here is what I want. I click a button (called Psi Storm) and then I get to choose where to use it. It is like I pressed the ability icon.
In short: Not possible. At least not with a nice targeting circle and stuff.
Ok, I haven't tested this but here's my attempt to solve your problem.
What you want to do is make a button that toggles a boolean variable for a "weapon selection" kind of thing.
Then for your ability, using psi storm for example, find the effect it calls for. In this case it's "Psi Storm (Persistent)." Remember that.
Now for the cursor, find the psi storm "actor splat" actor and edit the event. Add a "actor create > create()" and "actor destroy > destroy()."
Now create a trigger for the dialog item button with a "dialog item is clicked" event. For the actions, do:
-If (dialog item clicked = psi storm button) { if(bool = true) then (set bool = false; destroy splat actor;) else (set bool = true; create splat actor;) }
Now for the trigger of the ability, create a mouse click event with the following actions:
-If (bool = true) then (create "Psi Storm (Persistent)" effect at (mousePosX , mousePosY))
Pardon my messy pseudo code.
Edit:
Ok so I tested it and it works. All except for the cursor splat. Maybe I have the parameters wrong or something. I don't know.
I attached the map.
Yes, that's what I mean with my last post.
The cursor splat seems to be attached to the cursor by the even abil.XXX.Cursor. Then, and only then, it gets attached to it.
I tried find a different event that you can actually trigger to make the splat show up underneath the cursor, but found none.
I also tried attaching the splat through creation parameters or whatever you could call it - to no avail.
I spend like two hours searching for a way to do so, but I just can't find any.
the one thing i would add to this, and i hope you fine gentlemen find a way to change the mouse cursor splat thing, but on the mouse click even if you use the effect, instead of ability order there are pluses and minuses of doing each way. i may be mistaken but on a map where i used the create effect, the effect would animated one the mosue click and not when the gun animation reached full (i.e. the missile / flame effect would start when the gun was sideways and no wait until the gun was str8 ahead). not a big deal, but little things like that can bother me. then on my current map im using the cast ability, and its set up and waits for the gun / animation to take place at the proper times. maybe you can find a way around this with the effect thing, but id just assume use 'cast ability mouseclickx,mouseclicky etc... the method of changing the mouse youve got is interesting i never thought to try it, though you said the cursor isnt working, but i like that im seeing new / fresh ideas. and sorry if i missed you suggesting it b4 s3rius sometimes you miss things in threads...
Yep. Same thing here after trying it myself. I guess you just gotta make an actual unit that has the ability with unlimited range and order it to cast the ability through triggers to get it all nice and pretty. Maybe make the unit have the ability but don't have it on their command card so they can't use it themself?
@kii064: Go
ive not tried this, i dont like to use dummy units... im stuborn like that. but i coulda sword s3rius talked about this in another thread saying that you cant 'force' and unit to click an abilitiy. so theres no way to simulate if you click a dialog to make a dummy unit click an ability to give the curos splat. i may be wrong as i refuse to use dummy units for things like this anymore, but im pretty sure i remember him already trying that out or whatnot...
@ezbeats: Go
Exactly.
The splat doesn't appear when a ability is cast, but when it is "selected". This selection can be done ONLY by the player hitting a spell button and cannot be simulated through triggers in any way (at least in no way I know of - and I already know most of the editor ..). So the only way to make a splat appear is to have a player who clicks on the command-card icon.
Dummy units, spells or whatever won't help there.
You're right. It can't be done. I'll stop persuing this at the moment.
Well, any news on this? Or still not doable?