HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Weird Stuff going on with SetUnitPositionLoc...

01-13-2003, 01:35 AM#1
CBWhiz
I'm using SetUnitLoc to move around some circles of power, and heres the weird part:
Their SHADOWS move to where they should be, but the bases either dissapear or stay where they are. Needless to say, WTF?

note that the variables are named incorrectly ;)
Code:
call SetUnitPositionLoc(udg_InvisiblePeasants[currentindex], PolarProjectionBJ(GetUnitLoc(udg_Heroes[GetPlayerId(GetEnumPlayer())]), 300.00, (mult * I2R(loopindex))))
01-13-2003, 01:37 AM#2
CBWhiz
oh shit, wrong forum emote_sweat

I meant to post in the main one, but I was reading in here first. Could a mod please move it?
01-17-2003, 06:11 AM#3
FM_TertiaryEye
Hey CB, i think i have a solution but i need to understand more of what you are trying to do.

Code:
call  SetUnitPositionLoc(udg_InvisiblePeasants[currentindex],  PolarProjectionBJ(GetUnitLoc(udg_Heroes[GetPlayerId(GetEnumPlayer())]), 300.00, (mult * I2R(loopindex))))

From this it looks like you are rotating all of your invisiblePeasants around a hero?
And is the hero supposed to be moving while these "shadows" are rotating around him?

If you are trying to get a spinning set of shadows i would reccomend making a unit based upon a shadow model, and just rotating that unit, instead of trying invisible units.

Although, i suspect that part of the problem is that the hero is moving, ill run a test and see for myself how it affects a moving unit, and hopefully i can be of some more help.
01-17-2003, 06:42 AM#4
FM_TertiaryEye
I ran a test and it worked pretty well actually, only a little bit of lag. So thats probably not the problem, what are you using to make your peasants invisible with btw, a trigger? an ability?

Just give me some more info please and i'm farily sure i can solve this problem.

:dance: (Eye likie trig functions ;) :dance:
01-17-2003, 10:47 PM#5
CBWhiz
actually, we have the "peasents" (now changed to another unit, old jass variable) move in a fixed position around the hero, whenever the hero moves.

for now it doesnt matter if shadows / models appear, since after i test it ill be setting the unit's model to nothing ;)

anyway, i basicly wanted somethign like this:
Code:
      a
  a     a
a  hero a
   a     a
      a
that automaticly jumps to the hero, like a "control panel" that detects selections events. the real purpous is a secret ;)

Anyway, the units were circles of power with shadows (custom units)
When I jumped them around, only the SHADOWS would align with my hero - strangely, the base (circle op power) would stay where it was - unless i scrolled the screen. It was an ODD graphical glitch...

Either way, I solved it now. Thanks anyway!
01-18-2003, 05:59 AM#6
FM_TertiaryEye
===============
The real purpous is a secret ;)
===============

Youve peaked my curiosity! Thats really mean, hehe, ok, can you PM me when you finish your map?

Good luck with the rest of it, and you are welcome.

Sincerely,
FM_TertiaryEye
01-18-2003, 06:22 PM#7
CBWhiz
lol

i'm working on it together with someone, and right now they have it and are modifying it.

its not going to be a map for my usage, but more for the community. Lets just say we have a theory on how to do something (or rather, approximate it) in multiplayer that you currently cant do without seperate programs (that the end user must run)