SphereCommunity
@Statgain? - Printable Version

+- SphereCommunity (https://forum.spherecommunity.net)
+-- Forum: Sphere 0.56d (/Forum-Sphere-0-56d)
+--- Forum: Script Help (/Forum-Script-Help)
+--- Thread: @Statgain? (/Thread-Statgain)



@Statgain? - Gil Amarth - 06-07-2012 07:33 PM

I have searching about a @Statgain trigger, but it seem it isn´t in sphere.

I have scripted a custom @Skillgain, but then I don´t have any statgain from it. There is a trigger: @StatChange, which is very useful, but if I try triggering manually like:

TRIGGER @STATCHANGE

Then I haven´t any of his arguments, like ARGN1 (the stat which changes), and ARGN2 (the value which will take).

There is any form of passing arguments to a trigger? I have considering to make a function to replicate @STATCHANGE, and putting into @SkillGain, but if there is any better way, much better. Tongue

Thanks in advance.


RE: @Statgain? - Gil Amarth - 06-07-2012 10:04 PM

Fixed with a function inside SkillGain.

I love functions. Lol


RE: @Statgain? - jeem - 06-08-2012 02:51 PM

In any case, it is possible to add args to a custom trigger.

Code:
08-10-2006, Furio
- Modified: TRIGGER command. It now supports calling a trigger with arguments, the syntax is:
  TRIGGER $trigger_name[,$trigger_arg_type,...] where $trigger_arg_type can be:
  - TAT_AS_ARGN (1): uses arguments as ARGN. Example: TRIGGER @MyTest,<def.TAT_AS_ARGN>,1,2,3
                     will call @MyTest with ARGN1=1 ARGN2=2 ARGN3=3.
  - TAT_AS_ARGS (2): uses arguments as ARGS. Example: TRIGGER @MyTest,<def.TAT_AS_ARGS>,hi you 2,yo !
                     will call @MyTest with ARGS=hi you 2,yo !.
  - TAT_AS_ARGO (3): uses arguments as ARGN. Example: TRIGGER @MyTest,<def.TAT_AS_ARGO>,01
                     will call @MyTest with ARGO.UID=01 (only if object with such uid exist).



RE: @Statgain? - Gil Amarth - 06-08-2012 05:52 PM

Thank you very much.

It would be more useful in the future. Smile