Within Range

The perfect one step solution for creating Ice/Sliding Mazes in both Reign of Chaos and The Frozen Throne. It is the only decent system around and it even works in RoC, is lagfree, perfectly optimized, fast and reliable. The included TerrainKill feature frees you from the tedious task of creating a thousand kill-regions.
User avatar
manstie
Posts: 278
Joined: Wed Jun 17, 2009 9:27 am
Account: manstie
Location: Perth, Australia
Contact:

Within Range

Unread post by manstie »

A unit comes within (range) of Unit Type???

Code: Select all

function InitTrig_Jumper takes nothing returns nothing
    set gg_trg_Jumper = CreateTrigger(  )
    call TriggerRegisterUnitInRange( gg_trg_Jumper, 100, unittype==Jumper )
    call TriggerAddAction( gg_trg_Jumper, function Trig_Jumper_Actions )
endfunction
:?
Image

User avatar
3ICE
Admin
Posts: 2520
Joined: Sat Mar 01, 2008 11:34 pm
Realm: Europe
Account: 3ICE
Clan: 3ICE
Location: Hungary
Contact:

Re: Within Range

Unread post by 3ICE »

Undeclared variable: unittype
Undeclared variable: Jumper
Cannot convert an integer to unit
Cannot convert boolean to real
Not enough arguments passed to function
Failed with 5 errors.

EDIT: Yes, I type that.
ImageImageImageImageImage
Image
ImageImage

User avatar
manstie
Posts: 278
Joined: Wed Jun 17, 2009 9:27 am
Account: manstie
Location: Perth, Australia
Contact:

Re: Within Range

Unread post by manstie »

Okay,
I was just asking if there was such an event in jass
Image

User avatar
3ICE
Admin
Posts: 2520
Joined: Sat Mar 01, 2008 11:34 pm
Realm: Europe
Account: 3ICE
Clan: 3ICE
Location: Hungary
Contact:

Re: Within Range

Unread post by 3ICE »

Why not use GUI?
ImageImageImageImageImage
Image
ImageImage

User avatar
manstie
Posts: 278
Joined: Wed Jun 17, 2009 9:27 am
Account: manstie
Location: Perth, Australia
Contact:

Re: Within Range

Unread post by manstie »

Because in gui, you can't make it:
"Unit comes in range of (variable or unit-type)"

Anyway in your system I do syntax checks and it says undeclared variable everywhere.

So is there an event in jass?
Image

User avatar
3ICE
Admin
Posts: 2520
Joined: Sat Mar 01, 2008 11:34 pm
Realm: Europe
Account: 3ICE
Clan: 3ICE
Location: Hungary
Contact:

Re: Within Range

Unread post by 3ICE »

manstie wrote:Because in gui, you can't make it
Ever heard of conditions? They are between event and action.

EDIT:
manstie wrote:Anyway in your system I do syntax checks and it says undeclared variable everywhere.
You are doing it wrong. My system has zero syntax errors, otherwise it would not work. JASS is not forgiving. If you leave so much as one syntax error in it, it will refuse to run until you fix it completely.

You shouldn't run syntax checks on my code. I have already made sure it works. The missing variables are declared in the trigger editor, and you forgot to feed that to your syntax checker. Practice a lot and you'll understand it soon enough.

EDIT2: If you really want to syntax check something that works fine already, here is the part you missed:

Code: Select all

globals
  group    udg_H            = null
  real     udg_Speed        = 0
  integer  udg_TerrainKill  = 0
  integer  udg_Slide        = 0
endglobals
Put that on the top.
ImageImageImageImageImage
Image
ImageImage

User avatar
manstie
Posts: 278
Joined: Wed Jun 17, 2009 9:27 am
Account: manstie
Location: Perth, Australia
Contact:

Re: Within Range

Unread post by manstie »

Oh yea, if it was possible to make it:
A unit comes within range of (A unit, any unit!)
Then I wouldn't have asked that.
Image

User avatar
3ICE
Admin
Posts: 2520
Joined: Sat Mar 01, 2008 11:34 pm
Realm: Europe
Account: 3ICE
Clan: 3ICE
Location: Hungary
Contact:

Re: Within Range

Unread post by 3ICE »

Great.

Add an event for each object you need. You can even do it dynamically with ForGroup or loop and "Trigger - Add New Event". Don't ask how, if you can't, then do it one by one.
ImageImageImageImageImage
Image
ImageImage

User avatar
manstie
Posts: 278
Joined: Wed Jun 17, 2009 9:27 am
Account: manstie
Location: Perth, Australia
Contact:

Re: Within Range

Unread post by manstie »

Can't make it "A unit comes within range of (Any unit from unit group)"
Image

User avatar
3ICE
Admin
Posts: 2520
Joined: Sat Mar 01, 2008 11:34 pm
Realm: Europe
Account: 3ICE
Clan: 3ICE
Location: Hungary
Contact:

Re: Within Range

Unread post by 3ICE »

3ICE wrote:Add an event for each object you need.
ImageImageImageImageImage
Image
ImageImage

Post Reply

Who is online

Users browsing this forum: Bing [Bot] and 6 guests