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.

Within Range

New postby manstie on Thu Jul 09, 2009 4:07 am

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
manstie
 
Posts: 273
Joined: Wed Jun 17, 2009 9:27 am
Location: Perth, Australia
Account: manstie

Re: Within Range

New postby 3ICE on Thu Jul 09, 2009 10:57 am

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
3ICE
Admin
 
Posts: 2105
Joined: Sat Mar 01, 2008 11:34 pm
Location: Hungary
Realm: US East
Account: 3ICE
Clan: 3ICE

Re: Within Range

New postby manstie on Thu Jul 09, 2009 11:53 am

Okay,
I was just asking if there was such an event in jass
Image
User avatar
manstie
 
Posts: 273
Joined: Wed Jun 17, 2009 9:27 am
Location: Perth, Australia
Account: manstie

Re: Within Range

New postby 3ICE on Thu Jul 09, 2009 11:54 am

Why not use GUI?
ImageImageImageImageImage
Image
ImageImage
User avatar
3ICE
Admin
 
Posts: 2105
Joined: Sat Mar 01, 2008 11:34 pm
Location: Hungary
Realm: US East
Account: 3ICE
Clan: 3ICE

Re: Within Range

New postby manstie on Thu Jul 09, 2009 11:58 am

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
manstie
 
Posts: 273
Joined: Wed Jun 17, 2009 9:27 am
Location: Perth, Australia
Account: manstie

Re: Within Range

New postby 3ICE on Thu Jul 09, 2009 12:05 pm

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

EDIT:
manstieAnyway 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
3ICE
Admin
 
Posts: 2105
Joined: Sat Mar 01, 2008 11:34 pm
Location: Hungary
Realm: US East
Account: 3ICE
Clan: 3ICE

Re: Within Range

New postby manstie on Thu Jul 09, 2009 12:49 pm

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
manstie
 
Posts: 273
Joined: Wed Jun 17, 2009 9:27 am
Location: Perth, Australia
Account: manstie

Re: Within Range

New postby 3ICE on Thu Jul 09, 2009 12:59 pm

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
3ICE
Admin
 
Posts: 2105
Joined: Sat Mar 01, 2008 11:34 pm
Location: Hungary
Realm: US East
Account: 3ICE
Clan: 3ICE

Re: Within Range

New postby manstie on Thu Jul 09, 2009 10:47 pm

Can't make it "A unit comes within range of (Any unit from unit group)"
Image
User avatar
manstie
 
Posts: 273
Joined: Wed Jun 17, 2009 9:27 am
Location: Perth, Australia
Account: manstie

Re: Within Range

New postby 3ICE on Fri Jul 10, 2009 6:46 am

3ICEAdd an event for each object you need.
ImageImageImageImageImage
Image
ImageImage
User avatar
3ICE
Admin
 
Posts: 2105
Joined: Sat Mar 01, 2008 11:34 pm
Location: Hungary
Realm: US East
Account: 3ICE
Clan: 3ICE

Next

Return to 3ICE's Sliding System for RoC



Who is online

Users browsing this forum: No registered users and 1 guest

cron