How to make an ability to assimilate items

  • Thread starter Thread starter grupoapunte
  • Start date Start date
G

grupoapunte

Guest
Hi i want to make an ability where the hero can consume an item from the inventory and keep the effect of this item, for exaple my hero have an item that fires to closer enemies (its a custom object that have an ability that fires), so i clic on my heros ability and then i clic on the inventory item, the inventory item disapears and the hero keeps the ability that the item had, so it will keep shooting.

I already have an ability that lets me target an item from my inventory, but i dont know how to do the rest.

Thanks, grupoapunte
 
basically you need to have a way of finding the ability that every item. the most basic and noob way to do this is parallel arrays. make an array of items and an array of abilities. ability[7] should be whatever ability that item[7] has. then when you use the ability that consumes an item you scan through the item array to find the index of that item and then add the ability with the same index to the hero.

there may be better ways to do it but this is probably the easiest.
 
yeah good idea i was thinking of an array of abilities but how do i know which item from my hero's inventory was clicked (sry im a programer but i dont get this editor well :banghead: im going crazy) but i still want to learn :D
 
i thought you said you already got that part working

Event Response - Target Item of Ability Being Cast
 
events: a unit uses an itme
action: get ability of item, and doooo, sumthing like that?
just an idea...
 
u do realise that this couldmake anyone whocan assimilate VERYVERYVERYVERYVERYVERY UNBALANCED. jeezwiz.

use a trigger

dont forget to callme: :cool:

or else u will lower my self-appreciation to lower than 0 and will will begin to killmyself
 
hi i have this done by now but i cant make the hero hold the new ability im checking the triggers but theres just a few acions to make my trigger and i cant make it work:

----------------------------------------------------------------

event
unit - a unit owned by player 1 (red) ends casting an ability

conditions
(ability being cast) equal to Assimilate

Actions
set ObjAss = (target item of ability being cast)
if (all conditions are true) then do (then actions) else do (else actions)
conditions
then actions
unit - add rockets to hero[1]
object - remove (target item of ability being cast)

---------------------------------------------------------------------

Sry i had to translate the code cuz my editor is in spanish, ok this are my problems: the object aint removed from hero (which its stored in hero[1]), and the hero isnt learning the ability (rockets)

plz can someone complete my code so it works for a single hero and single object, so i can then make it to work with anything
 
you have an if statement with no conditions? why? wouldnt that kinda be like.... never true?
 
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

Staff online

Members online

Affiliates

Hive Workshop NUON Dome World Editor Tutorials
Back
Top