HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Preventing unit from stopping!!

10-10-2004, 11:16 PM#1
Unknown6
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
TheGreatCheese
:god_help_us: Heres a map with some triggers on it that will hopefully help!
10-10-2004, 11:51 PM#3
Guest
Quote:
Originally Posted by Unknown6
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!
Its possible but it might take some jass or so...im at my gf's house right now so I cant see the map file till I get home =P
10-11-2004, 12:35 AM#4
Luzif3r
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
Unknown6
Quote:
Originally Posted by TheGreatCheese
:god_help_us: Heres a map with some triggers on it that will hopefully help!

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
-={tWiStÄr}=-
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
do the second trigger 3 other times but with each other arrow key and the corresponding angles. Right = 0 Up = 90 Left = 180 Down = 270
10-12-2004, 02:58 AM#7
Unknown6
Quote:
Originally Posted by -={tWiStÄr}=-
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
do the second trigger 3 other times but with each other arrow key and the corresponding angles. Right = 0 Up = 90 Left = 180 Down = 270

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
-={tWiStÄr}=-
have you tried mine? its kind of pointless to ask again once its figured out.
10-12-2004, 03:30 AM#9
Unknown6
Quote:
Originally Posted by -={tWiStÄr}=-
have you tried mine? its kind of pointless to ask again once its figured out.

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
Unknown6
Quote:
Originally Posted by misaki
Code:
Events
        Time - Every 0.10 seconds of game time

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
Vexorian
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
Unknown6
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
Vexorian
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
Unknown6
Quote:
Originally Posted by Lord Vexorian
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

all right