Complicated Math Problem For Trigger

TPOX

New Member
Reaction score
10
This is real hard I cant figure it out.

I have 13 lvls for an ability and i want the abilities lvl to depend on the value of something. The value goes from 0 to 300.

When the value of something is 0 i want it to be lvl 1, when value is 25 i want it to be lvl 2, value 50 i want lvl 3, it goes up by 25. The thing is though, i want to create a trigger with something like this.

Code:
Ascend
    Events
        Unit - A unit Starts the effect of an ability
    Conditions
        (Ability being cast) Equal to Ascend 
    Actions
        Set CastingUnit_Ascend = (Casting unit)
        Animation - Change CastingUnit_Ascend flying height to ((Current flying height of CastingUnit_Ascend) + 25.00) at 100.00
        Unit - Set Level of Flight Altitude (Evade) for CastingUnit_Ascend to ((Integer((Current flying height of CastingUnit_Ascend))) / (Integer(23.07)))

I know its not right but what im wanting to do is to change the lvl of ability depending on the height value.
 
I think the lvl has to be in whole #.
 
I would suggest setting another variable when your spell is cast to correspond to each height change--25=1, 50=2, and so on. Then, set all ability levels (or whichever ones you want) with the corresponding variable.

Just an idea.
 
Level = Integer( Value / 25.00 ) + 1


> (Current flying height of CastingUnit_Ascend) + 25.00

Well, you already know here that you're adding 25.
Why not just add 1 to your ability's level at the same time?
 
well heres my trigger sofar very simple just have to fix the height ability thing
Theres 7 lvls now, it goes from 0 height=lvl1 50 height=lvl2 100 height=lvl3 150 height=lvl4 200 height=lvl5 250 height=lvl6 300 height=lvl7.

Code:
Ascend
    Events
        Unit - A unit Starts the effect of an ability
    Conditions
        (Ability being cast) Equal to Ascend 
    Actions
        Set CastingUnit_Ascend = (Casting unit)
        Animation - Change CastingUnit_Ascend flying height to ((Current flying height of CastingUnit_Ascend) + 50.00) at 100.00
        Unit - Set Level of Flight Altitude (Evade) for CastingUnit_Ascend to <<<<<<((Integer((Current flying height of CastingUnit_Ascend))) / (Integer(23.07)))>>>>>>
 
0_0 LOL WOW
im an idiot why didnt i htink of that guess i got so side tracked into all other crap i didnt even think of the easiest ways lol
thanks
 
General chit-chat
Help Users
  • No one is chatting at the moment.
  • V-SNES V-SNES:
    Happy Friday!
    +1
  • The Helper The Helper:
    we were down for a minute - think a log file or something got too big
    +1
  • Ghan Ghan:
    The alerts say it was down for a while unfortunately.
  • Ghan Ghan:
    Didn't know what was going on while I was at work.
  • Ghan Ghan:
    Disk filled up with logs. Fixed now.
    +1
  • The Helper The Helper:
    not a problem at all thanks for getting us back up
  • The Helper The Helper:
    I think the bots are finding a way to get through the anubis
  • The Helper The Helper:
    Happy Wednesday Everyone! Hope everyone has a Fantastic Day!
    +1
  • The Helper The Helper:
    Yeah, stats are showing big bot influx like 12k page views.
  • Wizard Wizard:
    :wave:
    +1
  • Ghan Ghan:
    TH changed his avatar again. 6 more weeks of summer.
    +3
  • Wizard Wizard:
    lol
    +1
  • The Helper The Helper:
    Guys just a heads up I am going to be shutting the site down soon. I am just waiting on the NUON people to decide whether they want to transfer forum data and keep the discord. My email is [email protected] for anyone that wants to keep in touch and I have a facebook too. I will make an official post later. Love you guys and will miss everyone!
    +1
  • V-SNES V-SNES:
    Sent a pm @The Helper
  • Stephen Stephen:
    Oh no - please don't lose the Nuon content
    +1
  • The Helper The Helper:
    Someone email AtariAge and see if they want me to transfer the forum data over to it
  • Ghan Ghan:
    Could probably keep NUON stuff around here if we wanted.
  • Ghan Ghan:
    Hmm what to do about the World Editor site though?
  • Stephen Stephen:
    I'd rather personally just own a backup of the Nuon data than see it go to AtariAge honestly. If it gets enshittified as per usual, or if some of the "regular" Jaguar folks get there, it's not gonna be fun
  • The Helper The Helper:
    There will be a github of the forum data so the NUON Forum Data I guess would be available there
  • The Helper The Helper:
    World Editor is technically Ryoko stuff not mine you guys can keep that I am not in that even
  • jonas jonas:
    :( end of an era :(
  • The Helper The Helper:
    Dont think of it as an end jonas - think of it as a beginning, because really my friend that is what it is.
  • A Andyoyo:
    Thank you for the hard work over the years. It did not go unnoticed.

The Helper Discord

Members online

No members online now.

Affiliates

Hive Workshop NUON Dome World Editor Tutorials
Back
Top