- Joined
- Apr 16, 2008
- Messages
- 15
I'm attempting to create a trigger than has a chance to put an item in a random region. The items are already on the map, and the trigger is supposed to have a random chance to move a random item to a random region. I've got it semi-working, however I've noticed a few bugs.
Bug #1: The numbers (and the locations items end up) don't appear to be very random after all. I've restarted the map numerous times only to find that the same items end up in the same places.
Bug #2: Not so much a bug as a hole in my triggering ability. But with my current trigger the region that is decided on first has the greatest chance of getting an item, the 2nd less, the 3rd even less and so on. Is there a way to get every region to have the exact same chance to have an item moved there?
Bug #1: The numbers (and the locations items end up) don't appear to be very random after all. I've restarted the map numerous times only to find that the same items end up in the same places.
Bug #2: Not so much a bug as a hole in my triggering ability. But with my current trigger the region that is decided on first has the greatest chance of getting an item, the 2nd less, the 3rd even less and so on. Is there a way to get every region to have the exact same chance to have an item moved there?
-
ArtifactSpawn
-
Events
- Map initialization
- Conditions
-
Actions
-
For each (Integer A) from 1 to 13, do (Actions)
-
Loop - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
And - All (Conditions) are true
-
Conditions
- ((Random item in ArtifactSpawnRegions[(Integer A)]) is in ArtifactSpawnRegions[(Integer A)]) Equal to False
- (Random integer number between 1 and 4) Equal to (1)
-
Conditions
-
And - All (Conditions) are true
-
Then - Actions
- Item - Move (Random item in ItemPick <gen>) to (Center of ArtifactSpawnRegions[(Integer A)])
-
Else - Actions
- Do nothing
-
If - Conditions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
Loop - Actions
- Wait 0.50 seconds
- Item - Pick every item in ItemPick <gen> and do (Item - Remove(Picked item))
-
For each (Integer A) from 1 to 13, do (Actions)
-
Events