Hashtable - Unitpool causing crash

vonDarkmoor

New Member
Reaction score
9
I was trying to find a way to save a unit type in a hashtable but couldn't find anything that said "unit-type" but i did find a "unitpool" and when i clicked on it i got the normal screen(see below) When i click on the unitpool hyperlink, to fill in the option, my Editor "stops working" and crashes, any ideas why?
attachment.php


A related question that could be a work around: would this work?

Trigger:
  • Map Initialization
    • Events
      • Map initialization
    • Conditions
    • Actions
      • Visibility - Disable fog of war
      • Visibility - Disable black mask
      • Game - Set the time of day to 12.00
      • Game - Turn the day/night cycle Off
      • Hashtable - Create a hashtable
      • Set HashTable = (Last created hashtable)
      • For each (Integer A) from 0 to 100, do (Actions)
        • Loop - Actions
          • For each (Integer B) from 1 to 12, do (Actions)
            • Loop - Actions
              • Set Player[(Integer B)] = (Integer B)
              • Unit - Create 1 Place Holder for (Player((Integer B))) at (Center of (Playable map area)) facing Default building facing degrees
              • Hashtable - Save Handle Of(Last created unit) as (Integer A) of (Integer B) in HashTable
              • Unit - Remove (Last created unit) from the game

in conjunction with
Trigger:
  • Create
    • Events
      • Time - Elapsed game time is 5.00 seconds
    • Conditions
    • Actions
      • Unit - Create 1 (Unit-type of (Load 1 of 1 in HashTable)) for Player 1 (Red) at (Center of (Playable map area)) facing Default building facing degrees


Or does the action of removing the unit after it was saved null the save?
 

Attachments

  • Hastable.jpg
    Hastable.jpg
    31.8 KB · Views: 218

Laiev

Hey Listen!!
Reaction score
188
what editor u use? Normal or JNGP?

also i think you can use unit-type by id = integer :p

save the integer and done
 

vonDarkmoor

New Member
Reaction score
9
Im using the regular editor. How would saving an integer value work? doesnt integer = a number? this crash also happens when i click on the widget value field of Hashtable-save widget

:EDIT:

Made the trigger work by saving the unit-type as a string in the hashtable:

Trigger:
  • Map Initialization
    • Events
      • Map initialization
    • Conditions
    • Actions
      • Visibility - Disable fog of war
      • Visibility - Disable black mask
      • Game - Set the time of day to 12.00
      • Game - Turn the day/night cycle Off
      • Hashtable - Create a hashtable
      • Set HashTable = (Last created hashtable)
      • For each (Integer A) from 0 to 100, do (Actions)
        • Loop - Actions
          • For each (Integer B) from 1 to 12, do (Actions)
            • Loop - Actions
              • Set Player[(Integer B)] = (Integer B)
              • Unit - Create 1 Place Holder for (Player((Integer B))) at (Center of (Playable map area)) facing Default building facing degrees
              • Hashtable - Save (String((Unit-type of (Last created unit)))) as (Integer A) of (Integer B) in HashTable
              • Unit - Remove (Last created unit) from the game


Trigger:
  • Create
    • Events
      • Time - Elapsed game time is 5.00 seconds
    • Conditions
    • Actions
      • Unit - Create 1 (Unit-type((Load 1 of 1 from HashTable))) for Player 1 (Red) at (Center of (Playable map area)) facing Default building facing degrees



Still got the crashing problem, but i guess i just don't need to click those options :)
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Staff online

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top