• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

NEED FAST HELP!!!!!! PLEASE!

Status
Not open for further replies.
Level 8
Joined
Nov 20, 2005
Messages
372
I Picked every player in all players and want to move the hero of the player then I want to remove the location for antilagg. but it says ENDIF needed. Please Help.

Call RemoveLocation(udg_Aim[GetConvertedPlayerId(GetEnumPlayer( ) ) ] )

thats my Own Script something isn right...

My Variable Aim [ Point ] Array 12 ( 12 players )

I want to have the Picked player Number in The Funktion but theres something wrong ! :evil:

Call RemoveLocation(udg_Aim[GetConvertedPlayerId(GetEnumPlayer( ) ) ] )

please help fast!
 
Level 6
Joined
Feb 18, 2005
Messages
263
if you would post your trigger i might be able to debugg it, but this way i have to kinda try and rewrite it -.- annoying but i'll do it once

it's you who'll have to live with semi code

for each player in group(all players) do
set <you unit> = pick random unit owned by(picked player) matching(matching unit is a hero = true)
//do with your unit whatever you please to
//you might also refer to locations via 'convert coordinates(x,y) to region' and looking up the coordinates in the WE (botten left - changes when you move the mouse)
//hope this helps
endfor

this way you can ignore the need of any kind of region
anyway - if you need this trigger frequently i would, instead of using an if to determine where the unit shall be moved to, use an array with the point for each condition/player predefined or maybe simply several arrays - whatever you please to
you might do that like this

move <your unit> instantly to <your point array>[Playernumber of (Triggering Player)]

hope you understood what i wanted to tell you, for it did not take the time to think properly about my writing - hope you din't mind.
if you still ahve problems, simply ask again, a more specific eventually, and i might try to answer them again ^^
 
Level 6
Joined
Feb 18, 2005
Messages
263
if you only store the location within a variable, no lag is created, for the variable does not _create_ a region it refers only to a point on the map

its _regions_ with all their possible events (that are checked every 0.0* seconds if i am not mistaken) that course all the lag.

if you just use locations instead of regions everything should be fine - and even if you'd use regions - as long as you do not store them anywhere, they do not create any lag at all

but if you really want to get rid of anything like any storage of regions and/or locations then use jass and do something like this:
jass - 'set <my var> = null'
but make shure you _write_ "null" (without the "s)
the identifyer "null" refers to absolutly nothing. any varibale set to this will have _no_ value - not even 0. absolutly nothing.
and therefore it can not at any chance create any lag at all - or at least no more than it's mere existance can course anyway.
 
Status
Not open for further replies.
Top