I have an ability where a rocket is fired and a persistant effect is added that looks for enemy units within its vicinity. Before it deals damage, it checks what weapon the caster unit was firing using the "Unit Weapon Firing" validator. The map crashes when the projectile should impact everytime I use this validator and works without it.
I was afraid you'd ask that as there's no way for a beam to inheritantly filter through units it passes.
The best solution I can think of is to scan for the nearest target using triggers. One way to do this is to first fire an invisible beam at your dummy and have it do some effect on all the units in a line that you want to get damaged. Then check with triggers which units got hit by the effect and pick the closest one to the caster to fire the real beam at. To make the real beam still follow your mouse and not instantly pan to the damaged unit, you might want to place your dummy unit at the damaged unit but with the same angle as the mouse pointer relative to caster. Since it will be the closest unit, it should be the only one affected by the beam's line of fire.
You can pick one at random by doing a loop. I haven't checked the math, but I think this shouldn't be biased.
for i from 1 to NumRestaurants
sum = 0
for j from i to NumRestaurants
sum =+ score[j]
if (randReal(0, 1) <= score[i]/sum) // score[i] and sum must be fixed reals
return i; // your winning restaurant
return NumRestaurants // in case it failed to return a value
Trigger code is really easy to obfuscate in comparison to the data. If you look at MapScript.galaxy, all local variables begin with lv_, all globals begin with gv_, functions with gf_, etc.
Don't do it that way. All function and variable declaration have their names follow their types (int, bool, fixed... etc). Simply search for any statement beginning with a type and you'll catch all of them.
Why would you want to obfuscate data editor entries?
There's some sense in trying it on script to prevent others from stealing your code. Note that obfuscation will not increase security with respect to save/load systems.
Jewel thing: i was bored after the 1st round. i was absolutly focused on the stupid jewels and i didn´t even look on the battle. it´s a nice idea and a real modification of starcraft gameplay, but again the gameplay is boring and there is no humor like in aiur chef. 2/10
That's sort of the point. I like bejeweled and playing it this way is a lot more fun. They really made the game feel more addictive: rather than racing against a clock, you're participating in an intense tug of war against other players.
What pissed me off is that they said all of these maps can be done by everyone with their own editor, while they uses restricted function for flash dialog item in Bejeweled, which basically means non-blizzard map will never be able to make the gems animate like that
Has anyone even attempted hacking this? Blizzard is not known for tight security (anyone remember the old WC3 checksums for scripts?).
Only bools, ints, reals, strings (texts?) and object pointers can be passed as arguments to functions. Arrays as well as structs aren't referenced by pointers like every other object in the game is. You will get a 'bulk copy unsupported' error, because the function will try to duplicate the whole array which is not allowed.
The same happens if you try to set one array to equal another.
Could someone confirm or deny if triggering player is properly set when using 'Any Player' clicks/moves mouse. The function remains greyed out, but I could have sworn I've used it without issue before (with regards to mouse clicked anyways). This would likely require a multiplayer test.
0
I have an ability where a rocket is fired and a persistant effect is added that looks for enemy units within its vicinity. Before it deals damage, it checks what weapon the caster unit was firing using the "Unit Weapon Firing" validator. The map crashes when the projectile should impact everytime I use this validator and works without it.
0
@Maknyuzz: Go
I was afraid you'd ask that as there's no way for a beam to inheritantly filter through units it passes.
The best solution I can think of is to scan for the nearest target using triggers. One way to do this is to first fire an invisible beam at your dummy and have it do some effect on all the units in a line that you want to get damaged. Then check with triggers which units got hit by the effect and pick the closest one to the caster to fire the real beam at. To make the real beam still follow your mouse and not instantly pan to the damaged unit, you might want to place your dummy unit at the damaged unit but with the same angle as the mouse pointer relative to caster. Since it will be the closest unit, it should be the only one affected by the beam's line of fire.
0
Here's what you can do.
You can create an invisible dummy unit at a far range and update its position based on where the mouse pointer is relative to your caster.
You can make your unit fire a beam weapon at your dummy, so the effect will look like the beam is following the mouse pointer.
The Hellion can damage units in a line using its beam so you can probably damage all the units in the path of the laser beam.
Try this approach; I think it might work. I use a similar dummy construct for firing guns at the mouse pointer.
0
@zeldarules28: Go
You can pick one at random by doing a loop. I haven't checked the math, but I think this shouldn't be biased.
0
Don't do it that way. All function and variable declaration have their names follow their types (int, bool, fixed... etc). Simply search for any statement beginning with a type and you'll catch all of them.
0
Are you using any large GUI loops? GUI loops duplicate all their contents twice (with nested loops it's even worse).
0
Why would you want to obfuscate data editor entries?
There's some sense in trying it on script to prevent others from stealing your code. Note that obfuscation will not increase security with respect to save/load systems.
0
That's sort of the point. I like bejeweled and playing it this way is a lot more fun. They really made the game feel more addictive: rather than racing against a clock, you're participating in an intense tug of war against other players.
0
Has anyone even attempted hacking this? Blizzard is not known for tight security (anyone remember the old WC3 checksums for scripts?).
0
@Vexal: Go
How do you make the projectile
1. Show an explosion effect on collision
2. Show a lasting wound effect on the unit hit
0
@RScottB: Go
You could disable the minimap and put a fake picture in its place.
0
Only bools, ints, reals, strings (texts?) and object pointers can be passed as arguments to functions. Arrays as well as structs aren't referenced by pointers like every other object in the game is. You will get a 'bulk copy unsupported' error, because the function will try to duplicate the whole array which is not allowed.
The same happens if you try to set one array to equal another.
0
Could someone confirm or deny if triggering player is properly set when using 'Any Player' clicks/moves mouse. The function remains greyed out, but I could have sworn I've used it without issue before (with regards to mouse clicked anyways). This would likely require a multiplayer test.
0
I had that back when I knew nothing about the World Editor. Then I learned just about every damn thing you could and all my previous ideas left me.
(SC2 is a totally different story. So much to do, so little time!)
0
@TheZizz: Go
I agree,
playing is for learning. Even though the point is to have fun, games that don't engage your mind get old quick.