HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Destructable in region dies not working - need alternative

08-30-2006, 01:17 PM#1
James1654
In my map, thousands of rocks are created at start, and for some reason these rocks arn't being included as a destructable in region dying. I mainly use gui, but is there a jass alternative, such as a destrutable matching condition?

Trigger:
Gold spawn
Collapse Events
Destructible - A destructible within Region 025 <gen> dies
Conditions
Collapse Actions
Game - Display to (All players) the text: yeh
Set int[60] = (Random integer number between 1 and 2)
Collapse If (All Conditions are True) then do (Then Actions) else do (Else Actions)
Collapse If - Conditions
int[60] Equal to 1
Collapse Then - Actions
Game - Display to (All players) the text: zomg
Set int[54] = (int[54] + 1)
Set locations5[int[54]] = (Position of (Dying destructible))
Item - Create Gold ore at locations5[int[54]]
Custom script: call RemoveLocation (udg_locations5[udg_int[54]])
Collapse Else - Actions
Do nothing

Thats the trigger. The yar and zomg where for testing porpouses, and it isn't even running the trigger.


Whoever gives me information that leads to the finding of this bug, dead or alive, will be rewarded with +rep and credits in my map. This does not include stuff like "Yer need to change somthing, mate"
08-30-2006, 01:27 PM#2
Rising_Dusk
Do you ever change the region in which all of these destructibles are placed?
That is something that would negate the entire event.
08-30-2006, 01:33 PM#3
Jacek
I remember something that destrucible in region works for 64 destructables only or something
08-30-2006, 02:12 PM#4
James1654
Quote:
Originally Posted by Jacek
I remember something that destrucible in region works for 64 destructables only or something

Thats weird. Can anyone tell me more about this "destructable in region" limit?

The trigger that creates the rocks is

Trigger:
rock
Events
Conditions
Collapse Actions
Collapse For each (Integer A) from 1 to 10, do (Actions)
Collapse Loop - Actions
Set int[50] = 0
Custom script: call RemoveLocation (udg_rockpoints[1])
Set rockpoints[1] = (rockpoints[2] offset by (112.00, (((-0.50 + (Real(int[49]))) x 2.00) x 112.00)))
Custom script: call RemoveLocation (udg_rockpoints[2])
Destructible - Create a Rock Chunks BIG at rockpoints[1] facing (Random angle) with scale 1.00 and variation (Random integer number between 0 and 5)
Collapse For each (Integer B) from 1 to int[49], do (Actions)
Collapse Loop - Actions
Set int[50] = (int[50] + 1)
Set rockpoints[2] = (rockpoints[1] offset by (0.00, -112.00))
Custom script: call RemoveLocation (udg_rockpoints[1])
Destructible - Create a Rock Chunks BIG at rockpoints[2] facing (Random angle) with scale 1.00 and variation (Random integer number between 0 and 5)
Set rockpoints[1] = (rockpoints[2] offset by (0.00, -112.00))
Destructible - Create a Rock Chunks BIG at rockpoints[1] facing (Random angle) with scale 1.00 and variation (Random integer number between 0 and 5)
Collapse If (All Conditions are True) then do (Then Actions) else do (Else Actions)
Collapse If - Conditions
int[50] Greater than or equal to int[49]
Collapse Then - Actions
Do nothing
Collapse Else - Actions
Custom script: call RemoveLocation (udg_rockpoints[2])

and

Trigger:
runrock
Collapse Events
Time - Every 1.00 seconds of game time
Conditions
Collapse Actions
Trigger - Run rock <gen> (ignoring conditions)

The rock spawn trigger doesn;t spawn them specifically as random point in region, or center of region, ect, but where it spawns them IS inside the region.

And after 17.5 seconds, runrock is turned off.

I am considering making all of the rocks units instead of destructables, but that is a last resourt and I dont want to do that. Is there any Jass alternative or somit that would pick all destructables matching condition.
08-30-2006, 04:17 PM#5
blu_da_noob
The BJ event for registering dying destructables has it's own artificial limit. It is quite easy to write your own one.

Trigger:
Destructible - Pick every destructible in (Playable map area) and do (Actions)
Collapse Loop - Actions
Trigger - Add to DestructDeathTrigger <gen> the event (Destructible - (Picked destructible) dies)

Just put that in some trigger running after your rocks are created, and adding a condition shouldn't be too hard.
08-30-2006, 04:50 PM#6
James1654
Cool, thanks mate, You get reputation and credits in quests in my map :)