HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

SetUnitPositionLoc...

11-18-2007, 08:48 PM#1
Pinzu
quick answer please...

whats wrong?


Collapse JASS:
function Trig_Barrack_Actions takes nothing returns nothing

local location p = GetUnitRallyPoint(gg_unit_hbar_0004)
local unit u1 = GetTriggerUnit()
local unit u2 = GetTrainedUnit()

    if ( Trig_Barrack_Func0001() ) then
        call SetUnitPositionLoc(u2), p )

*EDIT*

Read below...
11-18-2007, 08:49 PM#2
Pinzu
lol im stupid...

Collapse JASS:
function Trig_Barrack_Actions takes nothing returns nothing

local location p = GetUnitRallyPoint(gg_unit_hbar_0004)
local unit u1 = GetTriggerUnit()
local unit u2 = GetTrainedUnit()

    if ( Trig_Barrack_Func0001() ) then
        call SetUnitPositionLoc((u2), p )

If i could delete this shame, I would.. :D

while we are at it.. whats the local for specialeffect?
11-18-2007, 10:22 PM#3
Jazradel
local effect e = AddSpecialEffect(...)
11-19-2007, 07:13 PM#4
Salbrismind
Quote:
Originally Posted by Pinzu
lol im stupid...

Collapse JASS:
function Trig_Barrack_Actions takes nothing returns nothing

local location p = GetUnitRallyPoint(gg_unit_hbar_0004)
local unit u1 = GetTriggerUnit()
local unit u2 = GetTrainedUnit()

    if ( Trig_Barrack_Func0001() ) then
        call SetUnitPositionLoc((u2), p )

If i could delete this shame, I would.. :D

while we are at it.. whats the local for specialeffect?

whats the difference? lol
11-19-2007, 08:11 PM#5
Earth-Fury
he forgot a braket.

if ( Trig_Barrack_Func0001() ) then bad. Inline it so the condition is directly in the if - condition - then.

also, don't use locations, use X and Y coordinates. GetUnitX() GetUnitY(), and there are also pathing-safe unit movement functions which take X and Y coords.
11-21-2007, 01:47 PM#6
Pinzu
I did local effect.

Diffrence:
Collapse JASS:
call SetUnitPositionLoc(u2), p )
to -->
Collapse JASS:
call SetUnitPositionLoc((u2), p )

Quote:
pathing-safe unit movement functions which take X and Y coords
tell me more about this magic XY then how do I get the RallyPoint Location?

Is local sounds possible or would it be to risky, if it works how would I do it?

what do I need to open plug-ins?