Surferkid993
God surferkid993 = new God(awesome.me);
- Reaction score
- 16
Something is wrong, my game spawns 6 heros when I want it to only spawn 1, and they are the wrong hero. Every time it is the same hero, "Night Warrior".
Please look over this Its not as much as it looks, the long one is almost the same thing over and over so you can just check out the first action!
This is my code:
Shorter version of this is lower down.
SetType
Events
Time - Elapsed game time is 0.01 seconds
Conditions
Actions
Set HerosType[1] = Aquogrunt
Set HerosType[2] = Experiment X605
Set HerosType[3] = King's Spirit
Set HerosType[4] = Lucifer's Guard
Set HerosType[5] = Mud Digger
Set HerosType[6] = Night Archer
Set HerosType[7] = Parasite
Set HerosType[8] = Water Crusher
Set HerosType[9] = Zombie King
Set HerosType[10] = Night Warrior
Then,
Heros
Events
Unit - A unit Begins casting an ability
Conditions
Actions
If ((Ability being cast) Equal to Aquogrunt ) then do (Set Heros[(Player number of (Triggering player))] = 1) else do (Do nothing)
If ((Ability being cast) Equal to Experiment X605 ) then do (Set Heros[(Player number of (Triggering player))] = 2) else do (Do nothing)
If ((Ability being cast) Equal to King's Spirit ) then do (Set Heros[(Player number of (Triggering player))] = 3) else do (Do nothing)
If ((Ability being cast) Equal to Lucifer's Gaurd ) then do (Set Heros[(Player number of (Triggering player))] = 4) else do (Do nothing)
If ((Ability being cast) Equal to Mud Digger ) then do (Set Heros[(Player number of (Triggering player))] = 5) else do (Do nothing)
If ((Ability being cast) Equal to Night Archer ) then do (Set Heros[(Player number of (Triggering player))] = 6) else do (Do nothing)
If ((Ability being cast) Equal to Parasite ) then do (Set Heros[(Player number of (Triggering player))] = 7) else do (Do nothing)
If ((Ability being cast) Equal to Water Crusher ) then do (Set Heros[(Player number of (Triggering player))] = 8) else do (Do nothing)
If ((Ability being cast) Equal to Zombie King ) then do (Set Heros[(Player number of (Triggering player))] = 9) else do (Do nothing)
If ((Ability being cast) Equal to Night Warior ) then do (Set Heros[(Player number of (Triggering player))] = 10) else do (Do nothing)
Then,
Units
Events
Unit - A unit Begins casting an ability
Conditions
(Unit-type of (Triggering unit)) Equal to Scores
Actions
Unit - Create 1 HerosType[Heros[1]] for Player 1 (Red) at (Random point in ForestSmall <gen>) facing Default building facing degrees
Please look over this Its not as much as it looks, the long one is almost the same thing over and over so you can just check out the first action!
Please look over this Its not as much as it looks, the long one is almost the same thing over and over so you can just check out the first action!
This is my code:
Shorter version of this is lower down.
SetType
Events
Time - Elapsed game time is 0.01 seconds
Conditions
Actions
Set HerosType[1] = Aquogrunt
Set HerosType[2] = Experiment X605
Set HerosType[3] = King's Spirit
Set HerosType[4] = Lucifer's Guard
Set HerosType[5] = Mud Digger
Set HerosType[6] = Night Archer
Set HerosType[7] = Parasite
Set HerosType[8] = Water Crusher
Set HerosType[9] = Zombie King
Set HerosType[10] = Night Warrior
Then,
Heros
Events
Unit - A unit Begins casting an ability
Conditions
Actions
If ((Ability being cast) Equal to Aquogrunt ) then do (Set Heros[(Player number of (Triggering player))] = 1) else do (Do nothing)
If ((Ability being cast) Equal to Experiment X605 ) then do (Set Heros[(Player number of (Triggering player))] = 2) else do (Do nothing)
If ((Ability being cast) Equal to King's Spirit ) then do (Set Heros[(Player number of (Triggering player))] = 3) else do (Do nothing)
If ((Ability being cast) Equal to Lucifer's Gaurd ) then do (Set Heros[(Player number of (Triggering player))] = 4) else do (Do nothing)
If ((Ability being cast) Equal to Mud Digger ) then do (Set Heros[(Player number of (Triggering player))] = 5) else do (Do nothing)
If ((Ability being cast) Equal to Night Archer ) then do (Set Heros[(Player number of (Triggering player))] = 6) else do (Do nothing)
If ((Ability being cast) Equal to Parasite ) then do (Set Heros[(Player number of (Triggering player))] = 7) else do (Do nothing)
If ((Ability being cast) Equal to Water Crusher ) then do (Set Heros[(Player number of (Triggering player))] = 8) else do (Do nothing)
If ((Ability being cast) Equal to Zombie King ) then do (Set Heros[(Player number of (Triggering player))] = 9) else do (Do nothing)
If ((Ability being cast) Equal to Night Warior ) then do (Set Heros[(Player number of (Triggering player))] = 10) else do (Do nothing)
Then,
Units
Events
Unit - A unit Begins casting an ability
Conditions
(Unit-type of (Triggering unit)) Equal to Scores
Actions
Unit - Create 1 HerosType[Heros[1]] for Player 1 (Red) at (Random point in ForestSmall <gen>) facing Default building facing degrees
Please look over this Its not as much as it looks, the long one is almost the same thing over and over so you can just check out the first action!