Cant get trigger involving items to work. Please help.

  • Thread starter Thread starter mercilesblob
  • Start date Start date
M

mercilesblob

Guest
Hi all.
I've been trying to make a map with an ability called pickpocket which removes an item from a targeted hero and gives it to the caster. I've made a dummy spell and a trigger to move the item once the spell is cast, however, no matter how I put it it doesnt seem to work. Could you help me out please? Here's what I've got...

Events
Unit - A unit Finishes casting an ability
Conditions
(Ability being cast) Equal to Pickpocket
Actions
Item - Move (Item carried by (Target unit of ability being cast) in slot (Random integer number between 1 and 6)) to (Position of (Triggering unit))
Hero - Give (Target item of ability being cast) to (Triggering unit)

I've tried adjusting several things but it hasnt seemed to work. i also wondered if it might be randomly selecting an empty slot so I gave the target unit 6 items to make sure but it still didnt work. Does anyone know how I can solve this problem? Also, if you know a way I can make sure it doesnt randomly select an empty slot it would be greatly appreciated.
Thanks in advance for any help.
 
You are trying to move the item. This only works if it is on the ground, not if it's in an inventory. You've got to remove it at the targeted unit and give a new one to the caster.

And if you want it to always select a filled item slot you could have a loop checking which item slots are filled, and then if one or more are filled, select a random one of them.
 
Pickpocket
Events
Unit - A unit Finishes casting an ability
Conditions
(Ability being cast) Equal to Pickpocket
Actions
Hero - Drop the item from slot (Random integer number between 1 and 6) of (Target unit of ability being cast)
Hero - Give (Last dropped item) to (Casting unit)
 
Yeah, dropping and giving works, too, but that trigger doesn't do anything if the random number is for example six and that slot is empty.
 
well thats not bad though, if the enemy has lots of items, your move likely to get one, but if he has less then your less likely.
 
Yes you want the Thief to get nothing if he randomly picks an empty slot.

if you're going to just keep Looping because the slot was empty - you face a potential infinite loop if the target has *no* items.
 
I was wondering if I'd have to remove and create a new one... Thanks for the dropping idea. That should work. And also very good point on the loop thing bird. I'll just make it so you might get nothing. Safer that way. Unless of course I can find a way to do it safely. Thanks for the help. I'll try it out and see what i come up with. Cheers.

Bit of a problem. The change you suggested didnt work. The item still wont transfer. Any other ideas?
 
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