HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

LordOglog's JASS Death Region Creator

02-09-2007, 11:34 AM#1
Oglog
This program makes JASS code for killing units when they enter a region.
It is usefull if you are making a maze map and you have alot of regions and you don't want to make hundreds of different events.

Features:
Region prefix (if your not using the default "Region ")
Saves as a .j file
Special Effects (large list and you can enter your own)
Pauses units and has a changeable wait time before killing them (so it doesn't kill the unit before the special effect has finished).
Attachment points and modifiers.
Safe Players.
Help window.

Credits:
Me LordOglog (I know my name is Oglog on this forum.)
SFilip for telling me a better way to do region code, and for helping me find the format function.
moyack for all his help with de-bugging and improving the generated code. Thanks!
Also lastly to Anitarf for pointing out a little bug in the code!

Requirements:
Microsoft .NET Framework 2.0 which can be downloaded Here.

There is also a sample map in with the program.
Attached Images
File type: pngscreenieii1.png (23.0 KB)
Attached Files
File type: zipLordOglog's JASS Death Region Creator.zip (45.4 KB)
02-09-2007, 04:41 PM#2
Gerlif
Erhm.. take a look at this old tool...
02-09-2007, 08:38 PM#5
Oglog
My program has Region prefix Will allow neutral victim and extra to be safe, has attachment points and modifiers, has a wait time before killing the unit, and its 40kb smaller lol (lots more space lol). There is also Jass Region On Die Quickwrite v3.0 by Koga73 which does the same thing as JASS Genorator and is over 450kb larger.
02-11-2007, 03:41 AM#6
moyack
I couldn't open the program. This dialog was shown:

Zoom (requires log in)

Please check files dependencies.
Attached Images
File type: jpgClip_6.jpg (11.8 KB)
02-11-2007, 07:02 PM#7
Oglog
Hmm interesting the same sort of thing happens to me somnetimes when I close a program but never with mine.
Did this happen repeatedly?
02-11-2007, 07:15 PM#8
moyack
not repeteadly, always. I think the program needs some dll to include in the pack, or something special. BTW, In which language was made??
02-12-2007, 11:18 AM#9
Oglog
It doesn't need dlls, I don't have clue how to use them, it was made in VB 2005.
02-12-2007, 12:35 PM#10
moyack
Ahhh, Visual Basic.net. So your program requires .net framework. Please update your post indicating that requirement.

As soon as i have some time (I'm in the office now) I'll do a quick review.
02-12-2007, 01:05 PM#11
Oglog
Omg I can't belive I forgot to include that thanks alot.
02-13-2007, 06:13 PM#12
moyack
WEll, I managed to get a PC with .NET framework. I tested the program using advanced settings with this data:

Data entered

Zoom (requires log in)


And this is the JASS code generated with this data:

Code obtained

Collapse JASS:
//This JASS code was written using LordOglog's JASS Death Region Creator BETA
//Please credit me in some way although I can't exactly check every map and sue you it's just nice to give credit.

//To make this work properly make a trigger named My_Death_Regions and then click Edit - Convert to Custom Text and then Copy and Paste this code into the trigger.
//Thanks for using my software and be sure to check [url]www.lordoglogmaps.piczo.com[/url] for updates!

//===========================================================================

function Trig_My_Death_Regions_Conditions takes nothing returns boolean
if ( not ( GetOwningPlayer(GetTriggerUnit()) == Player(0) ) ) then // that's ok
return false
endif
if ( not ( GetOwningPlayer(GetTriggerUnit()) == Player(0) ) ) then // should be player 6 (Player(5))
return false
endif
if ( not ( GetOwningPlayer(GetTriggerUnit()) == Player(0) ) ) then // should be player 12 (Player(11))
return false
endif
if ( not ( GetOwningPlayer(GetTriggerUnit()) == Player(PLAYER_NEUTRAL_AGGRESSIVE) ) ) then
return false
endif
if ( not ( GetOwningPlayer(GetTriggerUnit()) == Player(bj_PLAYER_NEUTRAL_VICTIM) ) ) then
return false
endif
if ( not ( GetOwningPlayer(GetTriggerUnit()) == Player(bj_PLAYER_NEUTRAL_EXTRA) ) ) then
return false
endif
if ( not ( GetOwningPlayer(GetTriggerUnit()) == Player(PLAYER_NEUTRAL_PASSIVE) ) ) //Where is the then???
return false
endif
return true
endfunction

function Trig_My_Death_Regions_Actions takes nothing returns nothing
call PauseUnitBJ( true, GetTriggerUnit() )
call AddSpecialEffectTargetUnitBJ("overhead", GetTriggerUnit(), "Abilities\\Spells\\Demon\\RainOfFire\\RainOfFireTarget.mdx")
call TriggerSleepAction( 2 )
call DestroyEffectBJ( GetLastCreatedEffectBJ() )
call KillUnit( GetTriggerUnit() )
endfunction

//===========================================================================
function Events_My_Death_Regions takes nothing returns nothing
local region r = CreateRegion()
call RegionAddRect(r, gg_rct_MyRegion_000)
call RegionAddRect(r, gg_rct_MyRegion_001)
call RegionAddRect(r, gg_rct_MyRegion_002)
call RegionAddRect(r, gg_rct_MyRegion_003)
call RegionAddRect(r, gg_rct_MyRegion_004)
call RegionAddRect(r, gg_rct_MyRegion_005)
call RegionAddRect(r, gg_rct_MyRegion_006)
call RegionAddRect(r, gg_rct_MyRegion_007)
call RegionAddRect(r, gg_rct_MyRegion_008)
call RegionAddRect(r, gg_rct_MyRegion_009)
call RegionAddRect(r, gg_rct_MyRegion_010)
call TriggerRegisterEnterRegion(gg_trg_My_Death_Regions, r, null)
set r = null
endfunction

function InitTrig_My_Death_Regions takes nothing returns nothing
set gg_trg_My_Death_Regions = CreateTrigger(  )

call TriggerAddCondition( gg_trg_My_Death_Regions, Condition( function Trig_My_Death_Regions_Conditions ) )
call TriggerAddAction( gg_trg_My_Death_Regions, function Trig_My_Death_Regions_Actions )

call ExecuteFunc("Events_My_Death_Regions")

endfunction


First of all, the code has errors, mainly a missing then in the Death_regions_Conditions function.

The other issue is with the players, I chose player 1, 6 and 11, but the code checks player 1 (Player(0)) three times.

There are more things to fix, but I'll do when I'll be at home.
Attached Images
File type: jpgInterface.jpg (56.6 KB)
02-13-2007, 07:15 PM#13
Jacek
Man, it's obsolete since 1.18... just use Terrain type at point to check if unit deserves to die :P
02-13-2007, 10:33 PM#14
Ammorth
Terrain type at point isn't as clean as regions. The way terrain lays out, it can look like there is a path, but really there isn't. For example:

Zoom (requires log in)

The terrain in the picture looks like it has a reasonable path, but because of the way the terrain is tiled, that is not the case. The only places the player would be safe is on the blue squares... and they do not link up like the terrain does. With regions, you can fix stuff like that.
Attached Images
File type: jpgterrain copy.jpg (70.5 KB)
02-14-2007, 04:59 PM#15
Oglog
Thanks moyack for telling me about the errors, the player code i copied and pasted from player 1 and forgot to change the player numbers.
I've fixed al the things you said and re-uploaded it .