| 10-10-2004, 11:16 PM | #1 |
i'm trying to make a unit move forward and forward for ever. The player is only able to change the direction. but the unit will keep going. any idea?? may a property? like [ stat - can stop = false ] jajaja. i dunno. please, don't post ridiculous ideas ^_^ help! ![]() |
| 10-10-2004, 11:42 PM | #2 |
:god_help_us: Heres a map with some triggers on it that will hopefully help! ![]() |
| 10-10-2004, 11:51 PM | #3 | |
Guest | Quote:
|
| 10-11-2004, 12:35 AM | #4 |
it might be that the units you try to give orders to are owned by player neutral or neutral hostile. those got their own ai. just give them to a regular comp. |
| 10-11-2004, 02:00 AM | #5 | |
Quote:
thanks... but it didn't help. it's not what i'm looking for. That map uses periodic events. 10 players moving around with his unit may cause problems. well... i was able to get the values X and Y where the player ordered his unit to move. Events -A unit Is issued an order targeting a point Actions -Event Response - Target point of issued order to get X = set variant (or something) = (X of (target point of issued order) to get Y = set variant (or something) = (Y of (target point of issued order) you may get values like -13400, 970, etc. depends. i'm thinking.... it's not easy c ya. ![]() |
| 10-11-2004, 02:06 AM | #6 |
its actually not an issue of ordering it to stop. its an issue of making it keep going. we are gonna use polar projection Code:
event every .01 seconds //or whatever conditions actions pick every player in everyone order theunit to move to polarprojection(at angle MoveAngle[playernumberofpickedplayer] with distance 100) event Player 1 presses left arrow key Player 2 presses left arrow key ... conditions set MoveAngle[playernumberoftriggeringplayer] to 180 |
| 10-12-2004, 02:58 AM | #7 | |
Quote:
thanks, i'll modify your trigger an see. listen. my new mod is a map where each player selects a plane (yes, a plane) they can take off, land, upgrade and attack with a simple lazer or missiles. that's easy. but i need that the planes cannot stop moving forward. (have you ever seen a plane capable of stopping?) any more ideas?? c ya ![]() |
| 10-12-2004, 03:06 AM | #8 |
have you tried mine? its kind of pointless to ask again once its figured out. |
| 10-12-2004, 03:30 AM | #9 | |
Quote:
yeah, i'm on it. but i'll consider another ideas too ![]() |
| 10-14-2004, 05:59 AM | #10 |
Guest | PolarProjectionBJ has a memory leak... you should do a search for PolarProjectionNL, I think it was, on wc3sear.ch. What about... Code:
Key Press Left
Events
Player - Player 1 (Red) Presses the Left Arrow key
Player - Player 2 ....
Conditions
Actions
Set theta[GetConvertedId(GetTriggerPlayer())] = 25.00
-------- the higher the number, the faster the player will turn --------
Key Press Right
Events
Player - Player 1 (Red) Presses the Right Arrow key
Player - Player 2 ....
Conditions
Actions
Set theta[GetConvertedId(GetTriggerPlayer())] = -25.00
-------- the higher the number, the faster the player will turn --------
Key Release
Events
Player - Player 1 (Red) Releases the Left Arrow key
Player - Player 2 ....
Player - Player 1 (Red) Releases the Right Arrow key
Player - Player 2 ....
Conditions
Actions
Set theta[GetConvertedId(GetTriggerPlayer())] = 0
-------- no key press = move in straight line from GetUnitFacing() or w/e --------
Untitled Trigger 010
Events
Time - Every 0.10 seconds of game time
Conditions
Actions
-------- you might need to change the periodic time if it's choppy, or if it's long enough for the player to override --------
// also, you should probably change your unit's animation Cast Time, Cast Backswing Point, and combat animation/backswing points (if you let them have a normal attack) to zero, so they don't stop in midair or get the attack/cast order canceled by the move order... >.>
// use global variables because no wait functions are involved.
For each A from 1 to 12
set udg_tempLoc = position of Airplane[integer A]
set udg_moveToLoc = PolarProjectionVARIANT( udg_tempLoc, distance, (unit facing of Airplane[integerA] + theta[integerA], whatever other parameters you need) // PolarProjectionNL moves points, so get a JASS guru to write you the appropriate function or change this to work with PPNL...
// ok ok. PolarProjectionNL moves the location in the argument, so you would just use "call PolarProjectionNL(udg_tempLoc, etc.)". but it's not as intuitive >.>
Unit - Order Airplane[integerA] to Move To udg_moveToLoc
// or udg_tempLoc if you're using that.... o.0 |
| 10-14-2004, 01:17 PM | #11 | |
Quote:
My friend, your code is a host freezer. the [ time - every # seconds ] cancels spells, delays the player's "playing", and remember that each player will do each trigger (and every 0.10 seconds!!). I so i consider your code as wrong. (iX and iY are my integers.) i'm using: Unit - [unit] Is issued an order targeting a point then: Set iX = (Integer((X of [point targeted]))) Set iY = (Integer((Y of [point targeted]))) Unit - Order [unit] to Move To (Point((Real(iX)), (Real(iY)))) as you can see, i need to increment the values to order the unit to move further. but.. is not easy, the values are positives and negatives. like -1024,3598,252,532,790,-310,-500,8901. and i see no solution. anyways.. i'll keep on trying. i won't give up c ya!! |
| 10-14-2004, 01:33 PM | #12 |
I don't see why people still think that Periodic events cause lag, it only depends on what you do there, if a trigger that happens each 0.01 doesn't have leaks it will not cause any lag. And PolarProjectionBJ doesn't leak by itself either |
| 10-14-2004, 01:58 PM | #13 |
Code:
events [color=Blue]Unit - [unit] Is issued an order targeting a point not every body has a super pc . consider that. anyways, it's done. I used only one action: actions [color=Blue]Unit - Order [unit] to Move To ((Target point of issued order) offset by 99999 towards (Facing of [unit] degrees)[/color] That's all. works as i expected. That is exactly what i was looking for. thanks, you've been brilliant. as always. wait! that sounded gay! let's do it again: That's all. works as i expected. That's exactly what i was looking for. I appreciate your help. all of you. how did it sound ? just joking! c you soon.[/color] ![]() |
| 10-14-2004, 02:06 PM | #14 |
I don't have a super pc either, my PC is so bad that I can't play it on any graphic quality besides the lowest. Please let me kill this myth for once, Periodic events don't cause lag by themselves! , thanks |
| 10-14-2004, 02:08 PM | #15 | |
Quote:
all right ![]() |
