|
|
#1 |
|
User
Join Date: May 2006
Posts: 129
|
So I've started to do some coding again, sort of, and I have a few questions and problems: these are in no particular order:
1) Has anyone been able to trigger proper bouncing off of cliffsides (ie they bounce off in roughly the right direction) and other protrusions with any sort of given knockback system? 2) What's a good way to detect cliffs and distinguish between them and hills? Also in the same respect, how can you trigger that a unit can slide up and down hills, but bounce or fly off of cliffs? 3) What is a good way to detect damage coming from ranged unit orb attacks and regular abilities? 4) How do you make floating texts only appear for a particular player? (I just don't know the syntax )5) What would cause a trigger to skip actions without you telling it to? I seem to have this problem because all of my spells were working properly before and I tried adding in a new system to display damage dealt and now some spells don't seem to work, even though I thought they were completely isolated from the workings of the damage system. 6) Attached to this is my testmap, which contains the buggy system (using .GUI, sorry ) for making self-updating floating texts which update whenever a unit takes additional damage from the same source, and eventually dissipate and display the correct damage after a short period of time. How would you do this using JASS?[edit] removed map, link below Last edited by Drain Pipe : 04-26-2009 at 06:30 PM. |
|
|
|
| Sponsored Links - Login to hide this ad! |
|
|
|
|
#2 |
|
Procrastination Incarnate
Development Director
|
Cliffs are typically not pathable, hills are.
__________________ |
|
|
|
|
|
#3 |
|
User
Join Date: May 2006
Posts: 129
|
but at the same time, the upper and lower levels of walkable terrain is. Considering I'm currently measuring on a point basis, if I miss the point where it's unpathable, my units are just gonna keep going. Unless there's a specific way to check this already?
|
|
|
|
|
|
#4 | ||||
|
User
Join Date: Mar 2009
Posts: 195
![]()
|
Quote:
Yes, I have. It is not in the resources section though. I use a vector library to easily calculate an object's "velocity" and "position" vectors while applying the "acceleration" vector to the velocity vector properly. This achieves the effect of real physics. It really isn't that difficult once you know the vector math behind it. Quote:
If you're triggering a slide, then you can find the current cliff-level before you update the unit's position and then again after. If the two values are not the same, then the unit has officially moved down/up a cliff level. You could use different comparison operators to achieve different results. The function is: GetTerrainCliffLevel; Quote:
Most orb effects yield buffs on an affected unit, which you could detect using the EVENT_UNIT_DAMAGED unit event. Orb effects can also be applied to melee attacks, so if you can imagine every unit is given an "invisible" orb ability then you would be able to detect when an instance of damage has come from a trigger (or a regular ability) or a physical attack. Quote:
JASS:if GetLocalPlayer() == specificPlayer then // create and setup the floating text within this block endif In the previous code specificPlayer refers to a variable reference to the player that you would like to display the text-tag (floating text) for. For example, if it were the case that specificPlayer was set to reference the player Player(0) then the text-tag would only be displayed to player one. This is what I could answer off the top of my head, I'll look into your other queries. **I just saw the name of your map now, and its kind of funny - I have a map I'm working on named "Heroes" as well. This is something that I saw when looking through your "Damage setup" triggers. Trigger: You should add a "Custom Script: DestroyGroup( udg_TempStartGroup )" to remove the group handle. It doesn't make much of a difference because the group is only referenced once, but its always nice to try and be 100% clean. Trigger: Do Multiple ActionsFor each (Integer A) from 1 to 1600, do (Actions)![]() Loop - ActionsThe idea of updating these text-tags every 0.05 seconds, in which you loop through 1600 indexes doesn't seem very efficient to me. I think there might be a better (and quicker) way to go about this. If anybody pops out at me while I'm reading this I'll try and explain it. Last edited by TheKid : 04-20-2009 at 11:37 PM. |
||||
|
|
|
|
|
#5 |
|
User
Join Date: May 2006
Posts: 129
|
1) I got as far as units, but cliffsides don't work the same way because it doesn't collide with another object. I had an idea to create 3+ expanding points which stopped when they hit a cliff jump, then use those points to create a best fit line and use that as my bouncing reference (ie my virtual wall) I'm worried this might lag a lot so i wanted to know if there was a better method for bouncing off of cliffsides.
2) Ok that's what I did, well sort of. Each cliff is actually 128 higher than the previous one so i just did a multiplier to check for that difference and it worked ok... 3) The problem is that I don't need an orb effect for regular melee units because of how i setup my detection (ie all damage not coming from attack comes directly from the hero) The problem with orb effects is i tried using cold arrows and when I tried to get the damage, it returned 0. And it's useless if you want to have damage dealt based on attack damage dealt, so that doesn't work for me either if there is an ability that works and doesn't return 0 damage then I'll use that. Or I'll cheat..... 4) Thanks I'll try and work that in right away. BTW that damage detection is pretty much a copy of the really leaky one I saw on here but it's the only non-jass way I could setup my preliminary system. Also, I know that 1600 cycles is very inefficient, that's why I was wondeirng how I'd set this up differently in JASS (i'm slowly making the transition) that 1600 is basically 16 groups of 100 possible units running at 1 time. If a unit exists in a slot, then it updates the FT for that unit and cycles through for all units. This is the only way I could think of to make it MUI for 12 players (since i'm not sure which 12 are users and which 4 are neutral...) Last edited by Drain Pipe : 04-20-2009 at 11:50 PM. |
|
|
|
|
|
#6 |
|
User
Join Date: Feb 2007
Posts: 348
![]()
|
For the 1,600 cycles thing, construct a simple algorithm by using a loop that figures out the highest number to cycle through, updating each time a projectile is created.
__________________ |
|
|
|
|
|
#7 |
|
User
Join Date: May 2006
Posts: 129
|
Yeah that might cut it down to about 1/4-1/10th of it's used space since the FT instances last about 2-3 seconds before the slot is voided. Hmmm, I could also use the more efficient way of replacing the values from the last slot to the current slot. That way the system would only be running at about 5% capacity for most of the time, and for large unit groups, maybe 20-25%. Could be interesting to see how much faster it goes. In all actuality, unless there's a full house and every type of player is used, this system uses a very small portion of its capacity. Each player is about 6% of the systems capacity. So if no creeps are used then it's already using 24% less space each time it runs through, if i set it up right.
Last edited by Drain Pipe : 04-21-2009 at 01:16 AM. |
|
|
|
|
|
#8 |
|
User
Join Date: May 2006
Posts: 129
|
BUMP:
Ok I have a new question, well moreso a problem: For my floating text system, I've tried updating it so that it uses less space as to run faster, here's what I have thus far (Note the system right now is restricted to only display damage done by player 2 (blue), which is the player slot you take if you run the testmap from WE): The main damage detection part(3 triggers): Trigger: Trigger: Trigger: Damage setup
![]() Events
![]() Actions
![]() ![]() If (All Conditions are True) then do (Then Actions) else do (Else Actions)
![]() ![]() ![]() If - Conditions
![]() ![]() ![]() ![]() ((Triggering unit) is in DamagedUnitGroup_Player[(Player number of (Owner of (Damage source)))]) Equal to False
![]() ![]() ![]() Then - Actions
![]() ![]() ![]() ![]() Unit Group - Add (Triggering unit) to DamagedUnitGroup_Player[(Player number of (Owner of (Damage source)))]
![]() ![]() ![]() ![]() Set DamagedUnitGroupUnit[((100 x ((Player number of (Owner of (Damage source))) - 1)) + DamagedUnitGroup_int_Player[(Player number of (Owner of (Damage source)))])] = (Triggering unit)
![]() ![]() ![]() ![]() Set DamagedUnitGroup_DMG[((100 x ((Player number of (Owner of (Damage source))) - 1)) + DamagedUnitGroup_int_Player[(Player number of (Owner of (Damage source)))])] = (Damage taken)
![]() ![]() ![]() ![]() Floating Text - Create floating text that reads <Empty String> above (Triggering unit) with Z offset -50.00, using font size (8.00 + (4.00 x (DamagedUnitGroup_DMG[((100 x ((Player number of (Owner of (Damage source))) - 1)) + DamagedUnitGroup_int_Player[(Player number of (Owner of (Damage source)))])] / 300.00))), color (40.00%, 40.00%, 40.00%), and 90.00% transparency
![]() ![]() ![]() ![]() Set DamagedUnitGroup_FT[((100 x ((Player number of (Owner of (Damage source))) - 1)) + DamagedUnitGroup_int_Player[(Player number of (Owner of (Damage source)))])] = (Last created floating text)
![]() ![]() ![]() ![]() Countdown Timer - Start DamagedUnitGroup_Timer[((100 x ((Player number of (Owner of (Damage source))) - 1)) + DamagedUnitGroup_int_Player[(Player number of (Owner of (Damage source)))])] as a One-shot timer that will expire in 0.35 seconds
![]() ![]() ![]() ![]() If (All Conditions are True) then do (Then Actions) else do (Else Actions)
![]() ![]() ![]() Else - Actions
![]() ![]() ![]() ![]() For each (Integer A) from (100 x ((Player number of (Owner of (Damage source))) - 1)) to ((100 x ((Player number of (Owner of (Damage source))) - 1)) + DamagedUnitGroup_int_Player[(Player number of (Owner of (Damage source)))]), do (Actions)
![]() ![]() ![]() ![]() ![]() Loop - Actions
![]() ![]() ![]() ![]() ![]() ![]() If (All Conditions are True) then do (Then Actions) else do (Else Actions)
And this trigger updates the damage FTs and gets them to give a finishing display if the unit is not damaged again before the short timer expires: Trigger: Monitor Floating Texts2
![]() Conditions
![]() Actions
![]() ![]() For each (Integer B) from 2 to 2, do (Actions)
![]() ![]() ![]() Loop - Actions
![]() ![]() ![]() ![]() Set DamagedUnitGroupMaxSize_Int = DamagedUnitGroup_int_Player[b]
![]() ![]() ![]() ![]() For each (Integer A) from ((100 x (B - 1)) + 1) to ((100 x (B - 1)) + DamagedUnitGroupMaxSize_Int), do (Actions)
![]() ![]() ![]() ![]() ![]() Loop - Actions
![]() ![]() ![]() ![]() ![]() ![]() Set DamagedUnitGroup_Slot_CUR = (((100 x (B - 1)) + DamagedUnitGroupMaxSize_Int) - ((A - 1) - (100 x (B - 1))))
![]() ![]() ![]() ![]() ![]() ![]() If (All Conditions are True) then do (Then Actions) else do (Else Actions)
![]() ![]() ![]() ![]() ![]() ![]() ![]() Then - Actions
![]() ![]() ![]() ![]() ![]() ![]() ![]() Else - Actions
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Game - Display to (All players) the text: (Slot Number = + (String(DamagedUnitGroup_Slot_CUR)))
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Game - Display to (All players) the text: (Current MaxCount For Player + ((String(B)) + ( = + (String(DamagedUnitGroup_int_Player[b])))))
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Floating Text - Change the position of DamagedUnitGroup_FT[DamagedUnitGroup_Slot_CUR] to DamagedUnitGroupUnit[DamagedUnitGroup_Slot_CUR] with Z offset -50.00
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Floating Text - Change text of DamagedUnitGroup_FT[DamagedUnitGroup_Slot_CUR] to ((String((Integer(DamagedUnitGroup_DMG[DamagedUnitGroup_Slot_CUR])))) + !) using font size (9.00 + (3.00 x (DamagedUnitGroup_DMG[DamagedUnitGroup_Slot_CUR] / 400.00)))
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() If (All Conditions are True) then do (Then Actions) else do (Else Actions)
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() If - Conditions
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() (Remaining time for DamagedUnitGroup_Timer[DamagedUnitGroup_Slot_CUR]) Less than or equal to 0.00
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Then - Actions
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Floating Text - Destroy DamagedUnitGroup_FT[DamagedUnitGroup_Slot_CUR]
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Floating Text - Create floating text that reads <Empty String> above DamagedUnitGroupUnit[DamagedUnitGroup_Slot_CUR] with Z offset -50.00, using font size 10.00, color (100.00%, 100.00%, 100.00%), and 0.00% transparency
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Floating Text - Change text of (Last created floating text) to ((String((Integer(DamagedUnitGroup_DMG[DamagedUnitGroup_Slot_CUR])))) + !) using font size (9.00 + (3.00 x (DamagedUnitGroup_DMG[DamagedUnitGroup_Slot_CUR] / 400.00)))
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Floating Text - Change (Last created floating text): Disable permanence
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Floating Text - Change the lifespan of (Last created floating text) to (3.00 x (DamagedUnitGroup_DMG[DamagedUnitGroup_Slot_CUR] / 300.00)) seconds
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Floating Text - Change the fading age of (Last created floating text) to ((3.00 x (DamagedUnitGroup_DMG[DamagedUnitGroup_Slot_CUR] / 300.00)) x 0.80) seconds
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Floating Text - Set the velocity of (Last created floating text) to 50.00 towards (Random real number between 55.00 and 125.00) degrees
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Unit Group - Remove DamagedUnitGroupUnit[DamagedUnitGroup_Slot_CUR] from DamagedUnitGroup_Player[b]
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() -------- Replacing last slot into empty slot --------
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Set DamagedUnitGroupUnit[DamagedUnitGroup_Slot_CUR] = DamagedUnitGroupUnit[((100 x (B - 1)) + DamagedUnitGroup_int_Player[b])]
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Set DamagedUnitGroup_DMG[DamagedUnitGroup_Slot_CUR] = DamagedUnitGroup_DMG[((100 x (B - 1)) + DamagedUnitGroup_int_Player[b])]
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Set DamagedUnitGroup_FT[DamagedUnitGroup_Slot_CUR] = DamagedUnitGroup_FT[((100 x (B - 1)) + DamagedUnitGroup_int_Player[b])]
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Game - Display to (All players) the text: (Slot Number = + (String(DamagedUnitGroup_Slot_CUR)))
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Countdown Timer - Start DamagedUnitGroup_Timer[DamagedUnitGroup_Slot_CUR] as a One-shot timer that will expire in (Remaining time for DamagedUnitGroup_Timer[((100 x (B - 1)) + DamagedUnitGroup_int_Player[b])]) seconds
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() -------- Getting Rid of the last slot stats --------
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Set DamagedUnitGroupUnit[((100 x (B - 1)) + DamagedUnitGroup_int_Player[b])] = No unit
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Floating Text - Destroy DamagedUnitGroup_FT[((100 x (B - 1)) + DamagedUnitGroup_int_Player[b])]
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Game - Display to (All players) the text: (Slot Number = + (String(DamagedUnitGroup_Slot_CUR)))
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Set DamagedUnitGroup_int_Player[b] = (DamagedUnitGroup_int_Player[b] - 1)
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Game - Display to (All players) the text: (Current MaxCount For Player + ((String(B)) + ( = + (String(DamagedUnitGroup_int_Player[b])))))
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Else - ActionsMost of the middle of last second trigger you can ignore, but I need you to pay attention to the last 6 lines, not including the ingame message display (that was used for testing) and from the begining to the display of the first in game message. Those last 6 actions are supposed to be what would allow me to swap data from the current slot to the position of the maximum slot and bring in the dtata from the last slot of that set of data to the position of the current slot. In essence replace the expired FT with the last one, delete the data in the last slot, and reduce the max slot number by 1 (since the previous last slot was just emptied, or so I think it is). I also start at the largest number and move down so that I don't replace an expired slot with another expired slot (though theoretically that would fix itself in the next run of the trigger). Now for the most part, the system, seems to run fine, but every so often, a floating text will be left hanging there so somewhere there's a leak of information, I just cannot seem to find it. Now I'm currently trying to do this using .GUI to see if it can be done and if the method works. Later I'll try converting it to JASS but I want this to work properly before i do that. So this is where you guys come in. If you see something that does not look right, or that I'm doing something wrong with my algorithms, please post it, because I've looked over this code countless times and I'm not getting anywhere. Every attempt I make that I think will fix the error, does nothing. |
|
|
|
|
|
#9 |
|
User
Official Map Reviewer
Join Date: Jan 2006
Posts: 362
![]()
|
About cliffs (and hills), you should be using GetLocationZ and working out the average terrain normal from a small sample area around the target point. Check out any physics systems if you're interested.
|
|
|
|
|
|
#10 |
|
User
Join Date: May 2006
Posts: 129
|
can you give me a link to one?
also, the most prominent issue right now is my floating text code. ANYONE have ANY idea how it can leak? |
|
|
|
|
|
#11 |
|
User
Official Map Reviewer
Join Date: Jan 2006
Posts: 362
![]()
|
http://www.wc3c.net/showthread.php?t=98089
No idea about the floating text code, but I can't say I put too much effort into reading it - I can't stand GUI. Why are you using a for loop over a single value? (For each integer b from 2 to 2) |
|
|
|
|
|
#12 |
|
User
Join Date: May 2006
Posts: 129
|
Basically the whole idea is to create self-updating floating texts that will constantly update the damage they display for a unit, as long as it is within a very short time frame (currently damage instances are set to update the FT if they are within 0.35 seconds between each instance). The main reason for this is because I had some abilities that fired multiple small projectiles, or dealt small amounts of damage rapidly, so i figured this system would give the player a much better estimate of how much damage their ability was doing for a single unit. Right now it's not quite accurate for what I wish to make it out to be (once I actually finish my damage detection system) but it displays everything properly, for the most part.
Anyways, dl the map and try it out for about 2-3 minutes and you can see how the systems display looks.... and you will also notice the weird bug which I have been unable to locate in which floating texts are left undestroyed and all displayed across the playing field. that's not normally how it works, I just set it up to go through that one value (normally it's 1-12, so 1 cycle through for every player slot. As far as reading the code, there's only about 8 lines that you need to focus on, 6 of those are the last 6 lines of the code, not counting the game displayed messages. what the system does is it tracks up to 100 units (as it is right now) of which it will display the damage they take, per player but it stores all units, damage, floating texts, etc in one giant array of 1200 slots. I split up that array and only cycle through slots that actually have information, ie |
|
|
|
|
|
#13 |
|
User
Join Date: Feb 2007
Posts: 348
![]()
|
You're going to see floating text bugs, most likely, if you don't make the colors 100/100/100/100 and use regular |cAARRGGBBtext|r codes instead.
__________________Here's a simplified version of my projectile system: I took out the bouncing code because it's flawed. Trigger: ![]() Set Loop = -1
![]() Set TempLoopA = SsbHighestIndex
![]() Custom script: loop
![]() Set Loop = (Loop + 1)
![]() Custom script: exitwhen udg_Loop > udg_TempLoopA
![]() If (All Conditions are True) then do (Then Actions) else do (Else Actions)
![]() ![]() Then - Actions
![]() ![]() ![]() Set TempUnit[1] = SsbObject[Loop]
![]() ![]() ![]() Set TempPoint[1] = (Position of TempUnit[1])
![]() ![]() ![]() Set TempPoint[2] = (TempPoint[1] offset by (SsbSpeed[Loop] / SsbPeriodMod) towards SsbDirection[Loop] degrees)
![]() ![]() ![]() If (All Conditions are True) then do (Then Actions) else do (Else Actions)
![]() ![]() ![]() ![]() Then - Actions
![]() ![]() ![]() ![]() ![]() If (All Conditions are True) then do (Then Actions) else do (Else Actions)
![]() ![]() ![]() ![]() ![]() If (All Conditions are True) then do (Then Actions) else do (Else Actions)
![]() ![]() ![]() ![]() ![]() Set SsbZSpeed[Loop] = (SsbZSpeed[Loop] - (SsbGravity[Loop] / SsbPeriodMod))
![]() ![]() ![]() ![]() ![]() Custom script: set udg_TempReal[1] = (GetLocationZ(udg_TempPoint[1]))
![]() ![]() ![]() ![]() ![]() Custom script: set udg_TempReal[2] = (GetLocationZ(udg_TempPoint[2]))
![]() ![]() ![]() ![]() ![]() Set TempReal[3] = ((TempReal[1] - TempReal[2]) + (SsbZSpeed[Loop] / SsbPeriodMod))
![]() ![]() ![]() ![]() ![]() Set SsbHeight[Loop] = (SsbHeight[Loop] + TempReal[3])
![]() ![]() ![]() ![]() ![]() Animation - Change TempUnit[1] flying height to SsbHeight[Loop] at 50000.00
![]() ![]() ![]() ![]() ![]() Custom script: set udg_TempX[1] = (GetLocationX(udg_TempPoint[2]))
![]() ![]() ![]() ![]() ![]() Custom script: set udg_TempY[1] = (GetLocationY(udg_TempPoint[2]))
![]() ![]() ![]() ![]() ![]() If (All Conditions are True) then do (Then Actions) else do (Else Actions)
![]() ![]() ![]() ![]() ![]() ![]() If - Conditions
![]() ![]() ![]() ![]() ![]() ![]() ![]() SsbDistance[Loop] Less than SsbRange[Loop]
![]() ![]() ![]() ![]() ![]() ![]() ![]() (Rect[1] contains TempPoint[2]) Equal to True
![]() ![]() ![]() ![]() ![]() ![]() ![]() SsbLifespan[Loop] Greater than 0.00
![]() ![]() ![]() ![]() ![]() ![]() Then - Actions
![]() ![]() ![]() ![]() ![]() ![]() ![]() Custom script: call SetUnitX(udg_TempUnit[1],udg_TempX[1])
![]() ![]() ![]() ![]() ![]() ![]() ![]() Custom script: call SetUnitY(udg_TempUnit[1],udg_TempY[1])
![]() ![]() ![]() ![]() ![]() ![]() ![]() Set SsbDistance[Loop] = (SsbDistance[Loop] + ((Square root(((Power(SsbSpeed[Loop], 2.00)) + (Power(SsbZSpeed[Loop], 2.00))))) / SsbPeriodMod))
![]() ![]() ![]() ![]() ![]() ![]() ![]() If (All Conditions are True) then do (Then Actions) else do (Else Actions)
![]() ![]() ![]() ![]() ![]() ![]() Else - Actions
![]() ![]() ![]() ![]() ![]() ![]() ![]() If (All Conditions are True) then do (Then Actions) else do (Else Actions)
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Then - Actions
![]() ![]() ![]() Custom script: call RemoveLocation(udg_TempPoint[2])
![]() ![]() ![]() Custom script: call RemoveLocation(udg_TempPoint[1])
![]() ![]() ![]() Custom script: set udg_TempUnit[1] = null
![]() ![]() Else - Actions
![]() Custom script: endloopLast edited by Dark.Revenant : 04-26-2009 at 05:28 PM. |
|
|
|
|
|
#14 |
|
Procrastination Incarnate
Development Director
|
For bouncing off cliffs, the easiest way is to use the vector library to get the terrain normal vector at the collision point, flatten it's z value and then use it to modify the projectile's velocity vector (by subtracting from it it's projection onto the normal multiplied by two).
__________________ |
|
|
|
|
|
#15 |
|
User
Join Date: May 2006
Posts: 129
|
@Antiarf: vector library? link or is it a function or what? I might have to modify my knockback system to work that in.
@Dark: Hmmm, the problem isn't associated with the colors. BTW I've taken my system out of the big map and just put in by itself. You can all look and see for how it works a lot quicker now... each unit actually has 2 floating texts attached to them: one follows them around and updates itself and follows the unit, and then when the timer expires, that first one is destroyed and a second short duration floating text is created (this one isn't defined or attached to any variable so it shouldn't bug out). [edit] found the problem although I still don't understand it. Apparently if I can't transfer information between floating texts by just setting one as another...I have to manually create and update a new floating text, or something like that. Hopefully others might find this useful. Now I know it's just .GUI but it's the most efficient way I've been told of for keeping track of the data and updating everything so I hope yall enjoy. Last edited by Drain Pipe : 04-28-2009 at 05:23 AM. |
|
|
|
![]() |
| Thread Tools | Search this Thread |
|
|
|
Donate |