To be honest, this needs to be made waaaay more efficient for it to be useful. It takes much too long to generate the terrain. As impressive as it is, no player is going to want to sit and wait for 20 minutes for the terrain to generate. At any rate, trying to incorporate it into a multiplayer game would be impossible.
Thanks for the feedback. I may have to work on a more elucidating video over the next week or so. This one was more to give a taste of the general gameplay and UI. It's tough finding the right balance between keeping it short and interesting while also giving an adequate description of the game, as you indicated. Your commentary will certainly come in handy :)
The only reason I can think of for it not appearing in the list of variables is if you already define the type of variable on the right-hand side of the equation, which would exclude any available variables to that type. For example, if you have something like 'Variable = (triggering unit)' where Variable hasn't been selected yet, the only available options would be Unit variables.
I'm not sure what the limit is (I'm sure someone here does) but I can't really think of any reason for you to exceed that limit. There is probably some other reason your variable isn't working the way you want it to, but I need more information to help you further.
If I'm understanding you correctly, it seems like you would need to give the creator unit an ID in a custom value (or otherwise a global variable,) then set the missile's custom value to that ID. Then you can run a check like "Custom Value 1 of Missile == Custom Value 1 of Shooter" to get your match.
If, for example, the missile kills another unit and you want to add minerals for the killing player, you could do something like this (pseudo-code):
EventsAnyUnitDiesConditionsUnitTypeof(triggeringunit)==GuyWithAMissileLauncherUnitTypeof(Killingunit)==MissileVariablesKiller(unit)=(novalue)ActionsPickeachunitinUnitsofType'Guy With A Missile Launcher'inEntireMapownedbyAnyPlayeranddoActionsIfCustomValue1of(Pickedunit)==CustomValue1of(Killingunit)ThenSetKiller=(Pickedunit)Modifyplayer(OwnerofKiller)minerals:+1SendActorMessagetoKiller:PlayAnimDanceLoopForeverBreakElse
Items are units, so you could possibly use the "Unit Is Created" event, then under actions use a switch based on the triggering ability or the unit type of the created unit. You'll first want to run a conditional check to see if the item is in someone's inventory, then (if not) switch depending on <ability or unit type> and remove the item, refunding depending on the aforementioned condition.
Note that there could be the possibility of lag abuse which may result in the player being refunded multiple times for a lot of button presses during a lag spike. Adding a cooldown to the purchase of the item should be enough to avoid this issue.
That's a different problem entirely... not sure what the answer is to that one. You might not be able to use this method for targeted abilities... or you would have to come up with your own targeted ability system using triggers/data.
0
To be honest, this needs to be made waaaay more efficient for it to be useful. It takes much too long to generate the terrain. As impressive as it is, no player is going to want to sit and wait for 20 minutes for the terrain to generate. At any rate, trying to incorporate it into a multiplayer game would be impossible.
0
@fishy77: Go
Or you could make your boss bar using regular dialogs. It will take a bit longer to make but will give you more flexibility in the end.
0
@Trieva: Go
Thanks for the feedback. I may have to work on a more elucidating video over the next week or so. This one was more to give a taste of the general gameplay and UI. It's tough finding the right balance between keeping it short and interesting while also giving an adequate description of the game, as you indicated. Your commentary will certainly come in handy :)
0
Nice. This could come in handy for some of those bigger, more complex maps that need better memory management.
0
Search for your variable in the Overview Editor to make sure that it exists.
You can also try using custom script to set the variable by name. I think the naming convention for global variables is "gv_your_variable_name".
The format for setting a variable in custom script is simply "variable = value;".
0
@Stormahawk: Go
Nice. You learn quickly, Grasshopper! You can use code tags to make pasting into the forum easier (click the gears next to "Markup Type")
0
The only reason I can think of for it not appearing in the list of variables is if you already define the type of variable on the right-hand side of the equation, which would exclude any available variables to that type. For example, if you have something like 'Variable = (triggering unit)' where Variable hasn't been selected yet, the only available options would be Unit variables.
0
@Stormahawk: Go
Yes, it should work just fine for trained units.
Here's some pseudo-code that might help you out.
0
I'm not sure what the limit is (I'm sure someone here does) but I can't really think of any reason for you to exceed that limit. There is probably some other reason your variable isn't working the way you want it to, but I need more information to help you further.
0
How about this? I worked really hard on it.
0
@abvdzh: Go
If I'm understanding you correctly, it seems like you would need to give the creator unit an ID in a custom value (or otherwise a global variable,) then set the missile's custom value to that ID. Then you can run a check like "Custom Value 1 of Missile == Custom Value 1 of Shooter" to get your match.
If, for example, the missile kills another unit and you want to add minerals for the killing player, you could do something like this (pseudo-code):
0
@FunkyUserName: Go
Items are units, so you could possibly use the "Unit Is Created" event, then under actions use a switch based on the triggering ability or the unit type of the created unit. You'll first want to run a conditional check to see if the item is in someone's inventory, then (if not) switch depending on <ability or unit type> and remove the item, refunding depending on the aforementioned condition.
Note that there could be the possibility of lag abuse which may result in the player being refunded multiple times for a lot of button presses during a lag spike. Adding a cooldown to the purchase of the item should be enough to avoid this issue.
0
I just released the trailer for this game, so feedback on that would also be cool.
0
Well, you could remove the unit's weapon or stun the unit.
0
@sobatao: Go
That's a different problem entirely... not sure what the answer is to that one. You might not be able to use this method for targeted abilities... or you would have to come up with your own targeted ability system using triggers/data.