Staredit Network > Forums > SC2 Assistance > Topic: Point Variables
Point Variables
Jun 20 2011, 2:36 am
By: Bolshevik09  

Jun 20 2011, 2:36 am Bolshevik09 Post #1



"Unit Leaves 1.0 of [global or local variable]"
This event doesn't allow you to chose any variables?!
i tried using the function "point with offset" but it gives me "script load error - array...." but my arrays are right

I want a event that fires when a unit leaves his stored point



None.

Jun 20 2011, 3:21 am Roy Post #2

An artist's depiction of an Extended Unit Death

Yes, these "Unit Enters/Leaves" events are very particular, and I don't understand why. If anyone does know why you can't directly use variables, I'd love the input.

A hotfix is to select "Point with offset" and leave the offset at (0, 0). This will allow you to use the point variable.

Alternatively, you could have a periodic event trigger that constantly checks the distance between points (your point and the unit's position).




Jun 20 2011, 3:54 am Bolshevik09 Post #3



Quote from Roy
A hotfix is to select "Point with offset" and leave the offset at (0, 0). This will allow you to use the point variable.
Well i tried this and no luck.. What i have is as following:

-1st trigger
create unit
set "Point X" as position of last created unit

-2nd trigger
when unit leaves 1.0 of "point with offset <Point X>"
do actions..


Except 2nd trigger never fires... Seems like something is going on here. Also I am using arrays, which i don't believe it cant handle
I've also tried storing the units position as two separate Real variables and still the "leaves point" event cannot detect.
AND I've also tried creating a point on the map and moving the point to the position of the unit and then detecting if that unit leaves that point and it doesn't detect... sucks alot

Post has been edited 1 time(s), last time on Jun 20 2011, 4:29 am by Bolshevik09.



None.

Jun 20 2011, 6:14 am Roy Post #4

An artist's depiction of an Extended Unit Death

I actually meant "When Unit leaves 1.0 of (Point X with Offset(0, 0))"

You could create a circular region and detect when the unit leaves that, as well.




Jun 20 2011, 7:52 am Bolshevik09 Post #5



Quote from Roy
I actually meant "When Unit leaves 1.0 of (Point X with Offset(0, 0))"
You could create a circular region and detect when the unit leaves that, as well.

I've tried everything man, converting circle to region with x and y of points or the point itself, Using a physical point, Setting a point to a variable multiple ways and then returning it in the event.
But nothing works. It is driving me insane because it should work and i have the actions simple so that i would know if it works and all. I have looked through my map seeing if there was anything breaking this operation and nothing coexists. Its straight up: create a unit, assign it's position to a variable, and then detect when a unit enters or leaves that point. I don't get it or have any other ideas. GWARAHAHAHARARARAR
If you would like to poke around and see if you can fix things then go ahead...

Post has been edited 2 time(s), last time on Jun 20 2011, 8:16 am by Bolshevik09.



None.

Jun 20 2011, 11:17 am Ahli Post #6

I do stuff and thingies... Try widening and reducing the number of small nooks and crannies to correct the problem.

Quote from Roy
Yes, these "Unit Enters/Leaves" events are very particular, and I don't understand why. If anyone does know why you can't directly use variables, I'd love the input.
All events have to register somewhere because they aren't periodically checked like in SC1.
Sadly all these events need defined values or the everything option and can't be used with variables. (If you can use variables, the editor just copies the entry and pastes it into its event informations where it registered). So using variables in events makes no sense at all because it isn't supported.

I assume that the "unit" leaves "range" of "point" - event will make a static region (you can't reference it to change it) out of it. The whole event is pretty much the most useless event existing and a weak copy of "unit enters/leaves region"-event. :)

So, you would have to use a region for that (unit enters/leaves region) and move the region around (or stick it to a unit).

edit:
If you want to have events for a handful variable units, you would have to use an event that isn't specified (-> any unit) and check if the triggering unit and the unit in your variable is the same.




Options
  Back to forum
Please log in to reply to this topic or to report it.
Members in this topic: None.
[06:57 am]
maxar39174 -- Outdoor gym and fitness equipment manufacturer and suppliers https://mountwoodco.com/outdoorgym-equipment-manufacturer-in-uttar-pradesh.php
[06:57 am]
maxar39174 -- Outdoor gym and fitness equipment manufacturer and suppliers https://mountwoodco.com/outdoorgym-equipment-manufacturer-in-uttar-pradesh.php
[06:57 am]
maxar39174 -- Outdoor gym and fitness equipment manufacturer and suppliers https://mountwoodco.com/outdoorgym-equipment-manufacturer-in-uttar-pradesh.php
[06:56 am]
maxar39174 -- Outdoor gym and fitness equipment manufacturer and suppliers https://mountwoodco.com/outdoorgym-equipment-manufacturer-in-uttar-pradesh.php
[06:56 am]
maxar39174 -- Outdoor gym and fitness equipment manufacturer and suppliers https://mountwoodco.com/outdoorgym-equipment-manufacturer-in-uttar-pradesh.php
[06:56 am]
maxar39174 -- Outdoor gym and fitness equipment manufacturer and suppliers https://mountwoodco.com/outdoorgym-equipment-manufacturer-in-uttar-pradesh.php
[06:56 am]
maxar39174 -- Outdoor gym and fitness equipment manufacturer and suppliers https://mountwoodco.com/outdoorgym-equipment-manufacturer-in-uttar-pradesh.php
[05:02 am]
Oh_Man -- whereas just "press X to get 50 health back" is pretty mindless
[05:02 am]
Oh_Man -- because it adds anotherr level of player decision-making where u dont wanna walk too far away from the medic or u lose healing value
[05:01 am]
Oh_Man -- initially I thought it was weird why is he still using the basic pre-EUD medic healing system, but it's actually genius
Please log in to shout.


Members Online: Roy