If target is on equal or greater ground then it can be shot.
In addition if it is on lower ground AND the attacker does not have have the behavior then it can be shot.
A combine validator should be what you need. A validator that checked that the attacker either had 0 stacks of the behavior OR was targeting a unit at equal or greater cliff level to itself.
Yes the global time scale number is a multiplier for the rate time passes. 0.5 time scale means that time pass at half the rate.
The time scale stuff unfortunately has some bugs. Use at your own risk =)
I open the map and soldier2 is sitting right there in the list: 'Unit- Marine'.
If I make a new unit with name Marine and give it the normal marine as parent then it will initially show up as a blank unit name in the list.
But it is in the list, though you might have some trouble finding it unless you sort by source.
If you just close and reopen the map it will be fine. So this seems consistent with being the error you are encountering.
Keep in mind whenever the interface fails you, you can always switch to xml view to see what really exists.
"Only register for this event when you absolutely need it, as it will generate network traffic from all players for every button they press. This event fires when a player presses the specified key. Use "Key Pressed" to get the key that was pressed. Use "Alt Key Pressed", "Control Key Pressed", and "Shift Key Pressed" to find out what modifier keys were pressed."
Truncation rounds towards zero. I think the most common integer division to do in a programming language is truncation since this is the way people expect reals to be down converted to integers.
There is great diversity as to which convention for modulo is used in programming languages.
See the wikipedia entry for a giant table demonstrating this:
http://en.wikipedia.org/wiki/Modulo_operation
This all really stems from how to implement integer division.
While there is only the one convention for doing real division, there are 3 defensible ways of doing integer division and modulo:
Do you divide the two and then truncate the fractional part?
Do you instead take the floor function of the real quotient?
or Do you do an iterative process like in grade-school until you end up with a positive remainder with absolute value less than the divisor?(Euclidean Division)
Whatever your choice, If you have two integers, a and b, then normally this is gonna be true:
a = (a/b)*b + (a mod b)
At least for some division type operation and modulo type operation that your language defines.
Each different way of doing integer division results in a different modulo to satisfy that relationship.
Mathemagicians like their modulo always positive and their integer division euclidean.
Computer Scientists seem decidedly undecided on the matter. Many a holy flame war I am sure...
In a perfect world the computing lexicon would have come up with a nice consistent vocabulary in their languages for the 3 different divisions and modulos, and much confusion would be avoided.
Alas it is too late.
Yeah removing the native flag merely lets you actually type in script for the custom event. Since you had no script at all, ie the event definition you were defining does nothing, it won't matter one way or the other whether it is checked.
If you actually wanted to make a custom event then you would need to add script there which caused the trigger passed to the event to be added to your custom event handler.
The events entries you see in the editor are really just the 'prototypes'. They just declare what parameters each kind of event will be passing whenever it triggers, so that galaxy knows whats up. The actual code that handles events is completely hidden, hard-coded in the game. Something has to actually test each game frame whether an event has happened.
As far as I can tell there is no way to create a brand new events which are checked by the blizzard event handler system.
You can make your own event handler, but I do not think you can make it nearly as fast for this application.
I implemented a barebones morph from regular bunker to fortress and the turret worked fine.
Are you using the regular bunker or the one with a turret attached from the campaign?
If there is a turret already you might need to tell it to destroy the old turret actor.
0
@Form01: Go
I really think my suggestion does exactly that...
If target is on equal or greater ground then it can be shot. In addition if it is on lower ground AND the attacker does not have have the behavior then it can be shot.
0
@Form01: Go
A combine validator should be what you need. A validator that checked that the attacker either had 0 stacks of the behavior OR was targeting a unit at equal or greater cliff level to itself.
0
@Chris97Ong: Go
Yes the global time scale number is a multiplier for the rate time passes. 0.5 time scale means that time pass at half the rate. The time scale stuff unfortunately has some bugs. Use at your own risk =)
0
There is a trigger called set global time scale that may be what you are looking for.
0
@wisesquirrel: Go
I open the map and soldier2 is sitting right there in the list: 'Unit- Marine'.
If I make a new unit with name Marine and give it the normal marine as parent then it will initially show up as a blank unit name in the list. But it is in the list, though you might have some trouble finding it unless you sort by source. If you just close and reopen the map it will be fine. So this seems consistent with being the error you are encountering.
Keep in mind whenever the interface fails you, you can always switch to xml view to see what really exists.
0
You are using the any player presses key events.
Here is the in-editor description for them:
"Only register for this event when you absolutely need it, as it will generate network traffic from all players for every button they press. This event fires when a player presses the specified key. Use "Key Pressed" to get the key that was pressed. Use "Alt Key Pressed", "Control Key Pressed", and "Shift Key Pressed" to find out what modifier keys were pressed."
0
Truncation rounds towards zero. I think the most common integer division to do in a programming language is truncation since this is the way people expect reals to be down converted to integers.
0
@joemart06: Go
There is great diversity as to which convention for modulo is used in programming languages. See the wikipedia entry for a giant table demonstrating this: http://en.wikipedia.org/wiki/Modulo_operation
This all really stems from how to implement integer division. While there is only the one convention for doing real division, there are 3 defensible ways of doing integer division and modulo:
Do you divide the two and then truncate the fractional part?
Do you instead take the floor function of the real quotient?
or Do you do an iterative process like in grade-school until you end up with a positive remainder with absolute value less than the divisor?(Euclidean Division)
Whatever your choice, If you have two integers, a and b, then normally this is gonna be true:
a = (a/b)*b + (a mod b)
At least for some division type operation and modulo type operation that your language defines. Each different way of doing integer division results in a different modulo to satisfy that relationship.
Mathemagicians like their modulo always positive and their integer division euclidean.
Computer Scientists seem decidedly undecided on the matter. Many a holy flame war I am sure...
In a perfect world the computing lexicon would have come up with a nice consistent vocabulary in their languages for the 3 different divisions and modulos, and much confusion would be avoided. Alas it is too late.
0
It would be helpful to preview the Galaxy code in the editor and copy and paste the relevant lines verbatim into here.
0
@penguinwars: Go
Some catalog fields can be changed in game and some can't. You might try using upgrades or morphs instead.
0
@TheLazzoro: Go
Yeah removing the native flag merely lets you actually type in script for the custom event. Since you had no script at all, ie the event definition you were defining does nothing, it won't matter one way or the other whether it is checked.
If you actually wanted to make a custom event then you would need to add script there which caused the trigger passed to the event to be added to your custom event handler.
0
Bothered to do a little research this time, hehe.
The events entries you see in the editor are really just the 'prototypes'. They just declare what parameters each kind of event will be passing whenever it triggers, so that galaxy knows whats up. The actual code that handles events is completely hidden, hard-coded in the game. Something has to actually test each game frame whether an event has happened.
As far as I can tell there is no way to create a brand new events which are checked by the blizzard event handler system. You can make your own event handler, but I do not think you can make it nearly as fast for this application.
0
Your trigger should probably not have the 'Native' flag.
Native means the actual trigger code for it is hard-coded in the game(presumably because it's way faster that way).
Is it even possible to make custom events?
0
@TwoDie: Go
Index 0 is the currently executing order. The following trigger worked as expected:
Event
Timer - Every 0.1 seconds of Game Time
Condition
(Target unit for (Zergling [56.74, 64.52] order at index 0)) == Siege Tank (Siege Mode) [67.22, 64.47]
Action
UI - Display "Zergling attacking Siegetank" for (All players) to Subtitle area
Perhaps I am misunderstanding what your issue is.
0
I implemented a barebones morph from regular bunker to fortress and the turret worked fine.
Are you using the regular bunker or the one with a turret attached from the campaign? If there is a turret already you might need to tell it to destroy the old turret actor.