wc3campaigns
WC3C Homepage - www.wc3c.netUser Control Panel (Requires Log-In)Engage in discussions with other users and join contests in the WC3C forums!Read one of our many tutorials, ranging in difficulty from beginner to advanced!Show off your artistic talents in the WC3C Gallery!Download quality models, textures, spells (vJASS/JASS), systems, and scripts!Download maps that have passed through our rigorous approval process!

Go Back   Wc3C.net > Warcraft III Modding > Project Discussion > Map / Campaign Projects
User Name
Password
Register Rules Get Hosted! Chat Pastebin FAQ and Rules Members List Calendar



Reply
 
Thread Tools Search this Thread
Old 06-25-2015, 04:01 PM   #76
Rao Dao Zao
www.raodaozao.net
 
Rao Dao Zao's Avatar


MDL & Resource Moderator
 
Join Date: Aug 2003
Posts: 2,511

Submissions (27)

Rao Dao Zao has a brilliant future (822)Rao Dao Zao has a brilliant future (822)Rao Dao Zao has a brilliant future (822)Rao Dao Zao has a brilliant future (822)Rao Dao Zao has a brilliant future (822)Rao Dao Zao has a brilliant future (822)Rao Dao Zao has a brilliant future (822)

Approved Map: When the Freedom Slips Away

Send a message via MSN to Rao Dao Zao
Default

Quote:
Originally Posted by Anitarf
Did you remove the group by accident somewhere? Display the handle id of the group to ensure that it exists.
I did some tests before and I'm pretty sure that it still exists. It's obviously a GUI global variable, so it's created naturally at map init before anything executes.

... err, what's the code for displaying a group's handle id?

I do empty the group during scenario tear-down, but this is happening in the first generation in the map lifecycle so it's before any of that could have an impact.
__________________
Rao Dao Zao is offline   Reply With Quote
Sponsored Links - Login to hide this ad!
Old 06-25-2015, 09:43 PM   #77
Anitarf
Procrastination Incarnate


Development Director
 
Join Date: Feb 2004
Posts: 8,189

Submissions (19)

Anitarf has a brilliant future (903)Anitarf has a brilliant future (903)Anitarf has a brilliant future (903)Anitarf has a brilliant future (903)Anitarf has a brilliant future (903)Anitarf has a brilliant future (903)Anitarf has a brilliant future (903)Anitarf has a brilliant future (903)

2008 Spell olympics - Fire - SilverApproved Map: Old School Alliance TacticsHero Contest #2 - 3rd PlaceSpell making session 2 winner

Default

call BJDebugMsg( I2S( GetHandleId( udg_GlobalGroup ) ) )
__________________
Anitarf is offline   Reply With Quote
Old 06-26-2015, 11:10 AM   #78
Rao Dao Zao
www.raodaozao.net
 
Rao Dao Zao's Avatar


MDL & Resource Moderator
 
Join Date: Aug 2003
Posts: 2,511

Submissions (27)

Rao Dao Zao has a brilliant future (822)Rao Dao Zao has a brilliant future (822)Rao Dao Zao has a brilliant future (822)Rao Dao Zao has a brilliant future (822)Rao Dao Zao has a brilliant future (822)Rao Dao Zao has a brilliant future (822)Rao Dao Zao has a brilliant future (822)

Approved Map: When the Freedom Slips Away

Send a message via MSN to Rao Dao Zao
Default

Quote:
Originally Posted by Anitarf
call BJDebugMsg( I2S( GetHandleId( udg_GlobalGroup ) ) )
Apparently it does have a handleid...

My spawning code is thus:
Collapse JASS:
    set p = udg_WildAnimal_Spawns[i]
    set i = GetRandomInt( 1, udg_WildAnimal_TypeCount )

    call CreateNUnitsAtLoc( 1, udg_WildAnimal_Types[i], Player(PLAYER_NEUTRAL_AGGRESSIVE), p, GetRandomDirectionDeg() )
    set u = GetLastCreatedUnit()

    call GroupAddUnitSimple( u, udg_WildAnimal_Group ) // Group remains with 0 units.
    call DisplayTextToForce( GetPlayersAll(), "Printed " + GetUnitName(u) +" into group of " + I2S(CountUnitsInGroup(udg_WildAnimal_Group)) + " animals.")
    call BJDebugMsg( I2S( GetHandleId( udg_WildAnimal_Group ) ) )
And it produces the attached output...
Attached Images
File Type: jpg nooooooo.jpg (568.4 KB, 20 views)
__________________

Last edited by Rao Dao Zao : 06-26-2015 at 11:10 AM.
Rao Dao Zao is offline   Reply With Quote
Old 06-26-2015, 05:37 PM   #79
iNfraNe
PhD
 
iNfraNe's Avatar


Cinematics Moderator
 
Join Date: Dec 2003
Posts: 2,283

Submissions (7)

iNfraNe is just really nice (266)iNfraNe is just really nice (266)iNfraNe is just really nice (266)iNfraNe is just really nice (266)iNfraNe is just really nice (266)

Approved Map: Mortar Ball

Send a message via MSN to iNfraNe
Default

Hello, sadly, just displaying a handleId doesn't tell you if the group actually exists. It could be pointing to an empty memory address.

That's why this piece of code:
Collapse JASS:
scope a initializer Init 
    globals
        group g 
    endglobals
    private function Init takes nothing returns nothing
        set g = CreateGroup()
        call GroupAddUnit(g,CreateUnit(Player(0),'hfoo', 0, 0 ,0))
        call BJDebugMsg("Group '"+I2S( GetHandleId(g) )+"' contains: "+I2S( CountUnitsInGroup(g) )+" unit(s).")
        call DestroyGroup(g)
        call BJDebugMsg("Group '"+I2S( GetHandleId(g) )+"' contains: "+I2S( CountUnitsInGroup(g) )+" unit(s).")
    endfunction
endscope
outputs:
"Group '1048666' contains 1 unit(s)"
"Group '1048666' contains 0 unit(s)"

The most straightforward way of check is a group exists is, I guess, to do exactly what you were doing: add a unit and then check if the unit is in the group :)

TL;DR: your group does not exist. It was likely destroyed somewhere in your code.
__________________
Ever so slightly active.
Table:
Past Projects:
The Spirit of Vengeance (Cinematic, Blizzard contest winner)
Elimination Tournament
Mortar Ball
iNfraNe is offline   Reply With Quote
Old 06-26-2015, 07:10 PM   #80
Rao Dao Zao
www.raodaozao.net
 
Rao Dao Zao's Avatar


MDL & Resource Moderator
 
Join Date: Aug 2003
Posts: 2,511

Submissions (27)

Rao Dao Zao has a brilliant future (822)Rao Dao Zao has a brilliant future (822)Rao Dao Zao has a brilliant future (822)Rao Dao Zao has a brilliant future (822)Rao Dao Zao has a brilliant future (822)Rao Dao Zao has a brilliant future (822)Rao Dao Zao has a brilliant future (822)

Approved Map: When the Freedom Slips Away

Send a message via MSN to Rao Dao Zao
Default

Quote:
Originally Posted by iNfraNe
TL;DR: your group does not exist. It was likely destroyed somewhere in your code.
You're right and I am the stupidest stupidhead in the history of modding.

Guess what I had in a periodic trigger that is always enabled:
Collapse JASS:
    set bj_wantDestroyGroup = true
    call ForGroupBJ( udg_WildAnimal_Group, function Trig_Wild_Animal_Movement_Func002A )

Snort, guffaw.

Thanks guys!
__________________
Rao Dao Zao is offline   Reply With Quote
Old 06-26-2015, 07:27 PM   #81
iNfraNe
PhD
 
iNfraNe's Avatar


Cinematics Moderator
 
Join Date: Dec 2003
Posts: 2,283

Submissions (7)

iNfraNe is just really nice (266)iNfraNe is just really nice (266)iNfraNe is just really nice (266)iNfraNe is just really nice (266)iNfraNe is just really nice (266)

Approved Map: Mortar Ball

Send a message via MSN to iNfraNe
Default

Haha, the perks of using "GUI'd jass"! :)

Glad you found it.
__________________
Ever so slightly active.
Table:
Past Projects:
The Spirit of Vengeance (Cinematic, Blizzard contest winner)
Elimination Tournament
Mortar Ball
iNfraNe is offline   Reply With Quote
Old 06-27-2015, 07:16 AM   #82
Rao Dao Zao
www.raodaozao.net
 
Rao Dao Zao's Avatar


MDL & Resource Moderator
 
Join Date: Aug 2003
Posts: 2,511

Submissions (27)

Rao Dao Zao has a brilliant future (822)Rao Dao Zao has a brilliant future (822)Rao Dao Zao has a brilliant future (822)Rao Dao Zao has a brilliant future (822)Rao Dao Zao has a brilliant future (822)Rao Dao Zao has a brilliant future (822)Rao Dao Zao has a brilliant future (822)

Approved Map: When the Freedom Slips Away

Send a message via MSN to Rao Dao Zao
Default

Quote:
Originally Posted by iNfraNe
Haha, the perks of using "GUI'd jass"! :)

Glad you found it.
It's not even that, it's my senseless copy-pasta-ing of old code and then modifying it without any regard for the consequences. I'd not have found it if you hadn't told me what to look for, though, I'd have gone on blissfully blaming the engine for sucking.

Either way, success!
__________________
Rao Dao Zao is offline   Reply With Quote
Old 08-08-2015, 01:41 AM   #83
iNfraNe
PhD
 
iNfraNe's Avatar


Cinematics Moderator
 
Join Date: Dec 2003
Posts: 2,283

Submissions (7)

iNfraNe is just really nice (266)iNfraNe is just really nice (266)iNfraNe is just really nice (266)iNfraNe is just really nice (266)iNfraNe is just really nice (266)

Approved Map: Mortar Ball

Send a message via MSN to iNfraNe
Default

So, how's this going? Any progress you can share? I'm really interested to see where this random level thing goes :)
__________________
Ever so slightly active.
Table:
Past Projects:
The Spirit of Vengeance (Cinematic, Blizzard contest winner)
Elimination Tournament
Mortar Ball
iNfraNe is offline   Reply With Quote
Old 08-08-2015, 07:31 AM   #84
Rao Dao Zao
www.raodaozao.net
 
Rao Dao Zao's Avatar


MDL & Resource Moderator
 
Join Date: Aug 2003
Posts: 2,511

Submissions (27)

Rao Dao Zao has a brilliant future (822)Rao Dao Zao has a brilliant future (822)Rao Dao Zao has a brilliant future (822)Rao Dao Zao has a brilliant future (822)Rao Dao Zao has a brilliant future (822)Rao Dao Zao has a brilliant future (822)Rao Dao Zao has a brilliant future (822)

Approved Map: When the Freedom Slips Away

Send a message via MSN to Rao Dao Zao
Default

Quote:
Originally Posted by iNfraNe
So, how's this going? Any progress you can share? I'm really interested to see where this random level thing goes :)
Eurgh, I've been quite busy recently and not done a lot of work on it. The whole Miami business trip thing threw me right off (though I did have some time in the evenings to do some stuff in the hotel).

I've got a load of quest types and variations starting to roll in, with alternative dialogue for different quest giver types, so that stuff seems to be working quite well. Just need to start building up my variations, maybe start to add less basic quests that have more than one objective... I dunno, the scattershot approach feels a bit crap. I would like to generate quest chains but I really don't know how practical that would be, especially in a generated world where it's very hard to re-use space the way you can in a hand-crafted one.

The last thing I did was get wilderness shops working again; I wanted them to spawn at hotspots but not on top of the dirt tracks, so I do a nasty brute-force is-this-the-right-tile-type thing to make sure shops are plopped down at least a couple tiles off to the side of a path. (Unfortunately tiles that are part of paths are lost after the cellular automata passes run, in the C# rebuild I will keep better track of these through the ages.)

So nothing that exciting really. I kind of want to take a break and do some artwork, so I can put civilian buildings into the generated town and make it look a bit more alive.

But I am going back to my parents' for the weekend, so maybe I will have some time again to get back in the game.
__________________
Rao Dao Zao is offline   Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off


All times are GMT. The time now is 11:15 AM.


Affiliates
The Hubb The JASS Vault Clan WEnW Campaign Creations Clan CBS GamesModding Flixreel Videos

Powered by vBulletin (Copyright ©2000 - 2019, Jelsoft Enterprises Ltd).
Hosted by www.OICcam.com
IT Support and Services provided by Executive IT Services