Hi / Hej, I really like you library since its helps less advance users to create great map, but for us, maybe just me: Is it possible and how to customize the fire rate of the wepon? If i for instence would want a marines machine gun, with a clip around 30. Would that be possible? Or would the hole the trigger dont understand when holding down a key?
I won't go into customizing fire rate (which can easily be done), but here's how I did the holding down key to fire thing:
First you'll need to make a global variable which I called AttackShooting, it's a boolean and you need an array for every active player.
Then you modify the "Shoot" trigger. First you need a Set Variable action, have it set AttackShooting[player] to True. The player part is only needed if you have more than one player.
Then you need to add a 'While' with the condition 'AttackShooting[player] is true' (the player part is only needed if you have more than one active players). Then you put all the actions from before in the Shoot trigger into this While action, (so all actions are in it except the Set Variable one we just created).
Then at the end, still inside the 'While' action, you either just add a Wait action or a Wait For Timer action, corresponding to the fire rate/cooldown of the gun. Personally I made the cooldown based on a timer, but I don't think that's how it was done in the original library (can't remember).
Finally, you have to add another trigger called f.ex. Shoot Release where the event is when the player releases the left mouse button, and in the actions you put Set Variable Attack Shooting[player] false.
Ah thanks! But i have a map that has a selection of heroes, when you chooses one the variable is called on the playerunit. One of the heroes is a marauder.. This is really not my area.. but is it possible to change so its not sniper shots, but his rockets thats shoots away?
If so, how?
Very thanks in advance to anyone
Ah thanks! But i have a map that has a selection of heroes, when you chooses one the variable is called on the playerunit. One of the heroes is a marauder.. This is really not my area.. but is it possible to change so its not sniper shots, but his rockets thats shoots away?
If so, how?
Very thanks in advance to anyone
Funny that you mention it, I am experimenting with similar things. So far, I have had some success with this; having a global Game Link variable (array for every player) that stores the Effect of the gun you want your player units to have. So, with triggers you can change this variable to the damage/launch missile effect of the corresponding hero that players select. If they select a Marauder hero for example, Set Variable [for player] to Marauder - Punisher Grenades (Launch Missile).
Then in the Shoot trigger you have it execute that variable effect for the player, instead of simply the effect that is already put in.
You may have to change some fields in the data editor to have the effect Target Unit/Point instead of just Target Unit, but for me f.ex. a Marauder shot works just fine.
But I have to say that the above is something I am just experimenting with so I can't speak of how 'economical' the solution is.
Hello, I am playing around with this library in my current map. It is absolutely great, but I have one issue:
When my unit shoots downwards, it doesn't register a TargetPoint, which means the Damage effect doesn't execute. This only happens when I shoot on the ground of the lowest height areas in the map, so I think this has to do with something being a little messy with the height level calculation somewhere in the Traceline trigger. More specifically, it does register TargetUnits on this height, but not the terrain itself, so not TargetPoints.
If anyone's got an educated guess of what might be causing this, I'd love to hear it.
I am still struggling with this problem, and wonder if anyone knows what could be the issue. I think I have the Traceline trigger pretty much exactly the same as the original one.
I realized now that, when I aim at the lowest level, the further down I aim the higher up the TracePoint is. When it doesn't register shots towards the ground it is because they are actually 'aimed towards the sky'. So, there is some sort of mathematical inversion going on.
Since this only happens when CamPitch < 90, I think there is likely something wrong with the Set TraceHeight action's mathematics under that condition. However, the action looks exactly the same as on the original map. Maybe someone with more knowledge of mathematics knows what the funk is wrong and could invert the aim like I described, I would be grateful if they took a guess.
Edit: I still don't know what is causing this, but I seem to have found a workaround. In the bottom of the Traceline trigger there is a If/Then action to check whether terrain was hit. The condition compares the Ground height at TracePoint (to CamHeight & TraceHeight), and I just added a value of 0.05 to that TracePoint height, presumably fulfilling the condition, because now it seems to work to fire at the ground.
Well my problem with this is that it shoots at the feet of the unit..
First of all the Marauders own missile launch works only when fired at a unit for me. It does the animation and all if no unit is aquired, but doesnt fire the projectile. (Yes have Unit/Point)
So i created a new one. Which works! Fires when no unit is aquired, and all BUT still fires at feet,, I want it to shoot them in middle or something
weeeeeell... Actually what your doing is that your not... controlling the unit to move.
Ex. Normal camera mode, u select unit and right click at a point to his right so he walks there
This mode. you press D so he walks to the same point as in the ex above.
The difference is that the unit its not moving by command, but by triggers. If you look at the triggers the unit is actually standing still. An animation is played to make it SEEM like hes moving and the unit is moved to the location. So no.. the ability is not on by default and cant be applied directly. But you could make a trigger for it =) To add an upgrade to make the unit jump like a repear jump.
Thats a long story though and nothing im good at.
wrong, if your basing it off of this system, it uses issues ordernto move so all the actors for movement are fired therefore not really duplicating the effects. Its the exact same effect as if you were to click and move the unit. I dont see a reason you would need to duplicate the animation to move in any way, when issue order to move to point does everything already built into sc2.
Is it possible to make the condition that you can only damage a unit when hes inline of sight or "visible" in a reavealed area. Meaning if i or one of the allied is in line of sight i can shoot him, but not if hes in the "shadows" (fog of war)
If how, what would this condition be? Ive tried alot
I won't go into customizing fire rate (which can easily be done), but here's how I did the holding down key to fire thing:
First you'll need to make a global variable which I called AttackShooting, it's a boolean and you need an array for every active player.
Then you modify the "Shoot" trigger. First you need a Set Variable action, have it set AttackShooting[player] to True. The player part is only needed if you have more than one player.
Then you need to add a 'While' with the condition 'AttackShooting[player] is true' (the player part is only needed if you have more than one active players). Then you put all the actions from before in the Shoot trigger into this While action, (so all actions are in it except the Set Variable one we just created).
Then at the end, still inside the 'While' action, you either just add a Wait action or a Wait For Timer action, corresponding to the fire rate/cooldown of the gun. Personally I made the cooldown based on a timer, but I don't think that's how it was done in the original library (can't remember).
Finally, you have to add another trigger called f.ex. Shoot Release where the event is when the player releases the left mouse button, and in the actions you put Set Variable Attack Shooting[player] false.
Hope that made some sense.
Fixed:
@Dystisis:
Ah thanks! But i have a map that has a selection of heroes, when you chooses one the variable is called on the playerunit. One of the heroes is a marauder.. This is really not my area.. but is it possible to change so its not sniper shots, but his rockets thats shoots away?
If so, how?
Very thanks in advance to anyone
Funny that you mention it, I am experimenting with similar things. So far, I have had some success with this; having a global Game Link variable (array for every player) that stores the Effect of the gun you want your player units to have. So, with triggers you can change this variable to the damage/launch missile effect of the corresponding hero that players select. If they select a Marauder hero for example, Set Variable [for player] to Marauder - Punisher Grenades (Launch Missile).
Then in the Shoot trigger you have it execute that variable effect for the player, instead of simply the effect that is already put in.
You may have to change some fields in the data editor to have the effect Target Unit/Point instead of just Target Unit, but for me f.ex. a Marauder shot works just fine.
But I have to say that the above is something I am just experimenting with so I can't speak of how 'economical' the solution is.
I am still struggling with this problem, and wonder if anyone knows what could be the issue. I think I have the Traceline trigger pretty much exactly the same as the original one.
I realized now that, when I aim at the lowest level, the further down I aim the higher up the TracePoint is. When it doesn't register shots towards the ground it is because they are actually 'aimed towards the sky'. So, there is some sort of mathematical inversion going on.
Since this only happens when CamPitch < 90, I think there is likely something wrong with the Set TraceHeight action's mathematics under that condition. However, the action looks exactly the same as on the original map. Maybe someone with more knowledge of mathematics knows what the funk is wrong and could invert the aim like I described, I would be grateful if they took a guess.
Edit: I still don't know what is causing this, but I seem to have found a workaround. In the bottom of the Traceline trigger there is a If/Then action to check whether terrain was hit. The condition compares the Ground height at TracePoint (to CamHeight & TraceHeight), and I just added a value of 0.05 to that TracePoint height, presumably fulfilling the condition, because now it seems to work to fire at the ground.
@Dystisis:
Well my problem with this is that it shoots at the feet of the unit..
First of all the Marauders own missile launch works only when fired at a unit for me. It does the animation and all if no unit is aquired, but doesnt fire the projectile. (Yes have Unit/Point)
So i created a new one. Which works! Fires when no unit is aquired, and all BUT still fires at feet,, I want it to shoot them in middle or something
@doite: Go
Try using the effect Swann - Concussive Grenade (Launch Missile), and edit its target to Unit/Point. This at least works perfectly for me.
I have had the same problem you have with needing acquired unit, I am not sure what causes it, as I said I am still experimenting.
@Dystisis:
That one just right though them for me
ok the engine work perfectly except that the unit am using is a reaper. and it seams to lose hes ability to jump cliff :( can it be fix ?
@dnladt2:
weeeeeell... Actually what your doing is that your not... controlling the unit to move.
Ex. Normal camera mode, u select unit and right click at a point to his right so he walks there
This mode. you press D so he walks to the same point as in the ex above.
The difference is that the unit its not moving by command, but by triggers. If you look at the triggers the unit is actually standing still. An animation is played to make it SEEM like hes moving and the unit is moved to the location. So no.. the ability is not on by default and cant be applied directly. But you could make a trigger for it =) To add an upgrade to make the unit jump like a repear jump.
Thats a long story though and nothing im good at.
@dnladt2: Go
increase movement distance from .5 to 1.5
@doite: Go
wrong, if your basing it off of this system, it uses issues ordernto move so all the actors for movement are fired therefore not really duplicating the effects. Its the exact same effect as if you were to click and move the unit. I dont see a reason you would need to duplicate the animation to move in any way, when issue order to move to point does everything already built into sc2.
hey, howcome that when i click to download the library, it just shows a bunch of code?
??
@xXPwnerOfNoobsXx: Go
Try right click and save as
THERE ARE NO ATTACHED FILES, JUST CODE!
HELPPPPPPPPPP
Hey can abilities be added to this engine?
@ScrinKing: Go
Yes ofcourse. Just trigger them likewise as you would when shooting something. Look at my map -> Resident evil.. have some stuff
Is it possible to make the condition that you can only damage a unit when hes inline of sight or "visible" in a reavealed area. Meaning if i or one of the allied is in line of sight i can shoot him, but not if hes in the "shadows" (fog of war)
If how, what would this condition be? Ive tried alot
@doite:
solved
For the code seeing ppl. use explorer instead of firefox and it works.