- Joined
- Jul 7, 2007
- Messages
- 229
I'm setting up this system that saves a bunch of destructibles in a hashtable, and then also sets the corresponding coordinate in another hashtable to true or false depending on if there was a destructible there to save.
P.S. I know the first trigger leaks, it is work in progress.
-
Tile Indexer
- Events
- Conditions
-
Actions
-
For each (Integer A) from 1 to TB2D_MapSize_Y, do (Actions)
-
Loop - Actions
-
For each (Integer B) from 1 to TB2D_MapSize_X, do (Actions)
-
Loop - Actions
-
Destructible - Pick every destructible within (TB2D_TileSize / 2.00) of TB2D_TileIndexerPoint and do (Actions)
-
Loop - Actions
- Hashtable - Save Handle Of(Picked destructible) as (Integer A) of (Integer B) in TB2D_Table_of_Tiles
-
Loop - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- ((Integer A) is stored as a Handle of (Integer B) in TB2D_Table_of_Tiles) Equal to True
-
Then - Actions
- Hashtable - Save True as (Integer A) of (Integer B) in TB2D_Table_of_Booleans
- Else - Actions
-
If - Conditions
- Set TB2D_TileIndexerPoint = (TB2D_TileIndexerPoint offset by (TB2D_TileSize, 0.00))
-
Destructible - Pick every destructible within (TB2D_TileSize / 2.00) of TB2D_TileIndexerPoint and do (Actions)
-
Loop - Actions
- Set TB2D_TileIndexerPoint = (TB2D_TileIndexerPoint offset by ((0.00 - (TB2D_TileSize x (Real(TB2D_MapSize_X)))), (0.00 - TB2D_TileSize)))
-
For each (Integer B) from 1 to TB2D_MapSize_X, do (Actions)
-
Loop - Actions
-
For each (Integer A) from 1 to TB2D_MapSize_Y, do (Actions)
-
issaved
-
Events
- Player - Player 1 (Red) types a chat message containing show as A substring
- Conditions
-
Actions
- Game - Display to (All players) the text: ----------
- Game - Display to (All players) the text: (Name of (Load (Integer((Substring((Entered chat string), 6, 6)))) of (Integer((Substring((Entered chat string), 8, 8)))) in TB2D_Table_of_Tiles))
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- (Load (Integer((Substring((Entered chat string), 6, 6)))) of (Integer((Substring((Entered chat string), 8, 8)))) from TB2D_Table_of_Booleans) Equal to True
-
Then - Actions
- Game - Display to (All players) the text: true
-
Else - Actions
- Game - Display to (All players) the text: false
-
If - Conditions
- Game - Display to (All players) the text: ----------
- Animation - Play (Load (Integer((Substring((Entered chat string), 6, 6)))) of (Integer((Substring((Entered chat string), 8, 8)))) in (Last created hashtable))'s stand animation
-
Events
P.S. I know the first trigger leaks, it is work in progress.