SphereCommunity
Ammo system help. - Printable Version

+- SphereCommunity (https://forum.spherecommunity.net)
+-- Forum: Sphere 0.56d (/Forum-Sphere-0-56d)
+--- Forum: General Help (/Forum-General-Help)
+--- Thread: Ammo system help. (/Thread-Ammo-system-help)



Ammo system help. - rastrero - 01-15-2016 05:55 AM

Is there any direct way to trigger when u got no ammo? // I mean using archery.
I want to insert a little code there without need to check if the char got ammo.
I can check the backapack on each shot but its not fine for me.

I think its hardcoded but would be nice.


RE: Ammo system help. - karma - 01-16-2016 11:31 PM

A couple of lines executed at each shot is not a drama, i do something like this:
Code:
ON=@HitTry
IF (<ACTION> == skill_archery)
IF (<RESTEST 1 i_arrow>)
  sysmessage lol you can't
  trigger @HitFailNoAmmo
  return 1
ENDIF
ENDIF



RE: Ammo system help. - rastrero - 01-16-2016 11:56 PM

@HitFailNoAmmo

This trigger is yours? or sphere? where its is?


My combat system is custom, and is long just a couple of lines xDD
If sphere do it by itself its better for me to try take advantage of it.

ty for the answer


RE: Ammo system help. - karma - 01-17-2016 12:21 AM

Custom trigger, you can fire custom triggers with the TRIGGER keyword. As far as i know, sphere does not have a trigger for such a thing.


RE: Ammo system help. - rastrero - 01-17-2016 01:19 AM

Ok ty karma 4 ur help Big Grin