ints and floating text...

hunterrravyn

TH.net Regular
Reaction score
19
Heres the trigger

Code:
E-Unit - A unit Dies
C-((Killing unit) is A Hero) Equal to True
A-Set loc = (Position of (Killing unit))
   If (All Conditions are True) then do (Then Actions) else do (Else Actions)
    If - Conditions
        (Random integer number between 1 and 10) Greater than or equal to 8
    Then - Actions
        Set KillPlayer = (Owner of (Killing unit))
        Set HeroSp[(Player number of KillPlayer)] = HeroSp[((Player number of KillPlayer) + 1)]
        Floating Text - Create floating text that reads ((String(HeroSp[(Player number of KillPlayer)])) + <Empty String>) at loc with Z offset 20.00, using font size 10.00, color (0.00%, 0.00%, 100.00%), and 0.00% transparency
        Floating Text - Change (Last created floating text): Disable permanence
        Floating Text - Set the velocity of (Last created floating text) to 70.00 towards 90.00 degrees
        Floating Text - Change the lifespan of (Last created floating text) to 2.00 seconds
        Floating Text - Change the fading age of (Last created floating text) to 1.00 seconds
    Else - Actions

The main problem is that it never goes past 0...

oh ant variables are

HeroSp is an Int array
KillPlayer is an Player
loc is a point

if anyone can help it would be greatly appreciated, as for i have no clue....
(ive been working on m physics assignment.... finally finished :))
 

Artificial

Without Intelligence
Reaction score
326
Change
Code:
Set HeroSp[(Player number of KillPlayer)] = HeroSp[((Player number of KillPlayer)[b] + 1)][/b]
to
Code:
Set HeroSp[(Player number of KillPlayer)] = (HeroSp[(Player number of KillPlayer)[b]] + 1)[/b]
 

Chewbalka

New Member
Reaction score
14
i think its because the array needs to be a number value, but its giving a player value...

edit: beat me to it, plus im wrong :p
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Members online

      No members online now.

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top