Welcome to Open Carnage

A resource for modders and technology enthusiasts; have a wander to see why we're worth the time! EST. 2012

AnAsshole

Odd Custom Events/Commands Issue

Playing around with some events and commands in SAPP and have run into an odd issue.  

 

Using events/commands/variables like what 002 has put into SAPP documentation on pages 28-29 for events to accumulate points/buy items, etc. etc..  Not exactly my goal or purpose but the operation and logic is close to the same.

 

If I create the single custom event and command, it works.  But when I add in the second custom event and command, they will both run.

 

Using 002's example of buynades.... If I just have the buynades commands/events setup as listed in the documentation, it works fine.  When I add in a second event/command, such as buyhealth (same commands listed for buynades but instead of the nades SAPP command it issues an hp command), when calling the command to run the event for buyhealth, it will actually run both the buynades and the buyhealth, assuming you have enough "money" to do so.  If you don't have enough money for health, but do for nades, running buyhealth will result in it telling insufficient funds to buy health, but then will go ahead and execute the buynades and give you the 4 nades. 

 

Adding a third command does the same thing in that it will run all three commands.  It seems almost as if the custom events are tiered (first custom event added is event 1, second is 2, third is 3, so on and so forth) and running event 2 runs 2 then 1, running event 3 runs 3 then 2 then 1.  running 1 by itself only runs 1... like it runs all commands "below" it... if that makes sense. 

 

I can provide more exact commands/events if needed but the documentation examples match up pretty good with the logic. 

Share this post


Link to post
Share on other sites

Members of Open Carnage never see off-site ads.

On 5/25/2017 at 0:36 PM, AnAsshole said:

Playing around with some events and commands in SAPP and have run into an odd issue.  

 

Using events/commands/variables like what 002 has put into SAPP documentation on pages 28-29 for events to accumulate points/buy items, etc. etc..  Not exactly my goal or purpose but the operation and logic is close to the same.

 

If I create the single custom event and command, it works.  But when I add in the second custom event and command, they will both run.

 

Using 002's example of buynades.... If I just have the buynades commands/events setup as listed in the documentation, it works fine.  When I add in a second event/command, such as buyhealth (same commands listed for buynades but instead of the nades SAPP command it issues an hp command), when calling the command to run the event for buyhealth, it will actually run both the buynades and the buyhealth, assuming you have enough "money" to do so.  If you don't have enough money for health, but do for nades, running buyhealth will result in it telling insufficient funds to buy health, but then will go ahead and execute the buynades and give you the 4 nades. 

 

Adding a third command does the same thing in that it will run all three commands.  It seems almost as if the custom events are tiered (first custom event added is event 1, second is 2, third is 3, so on and so forth) and running event 2 runs 2 then 1, running event 3 runs 3 then 2 then 1.  running 1 by itself only runs 1... like it runs all commands "below" it... if that makes sense. 

 

I can provide more exact commands/events if needed but the documentation examples match up pretty good with the logic. 

 

BUMP :)


h2_zpsdpjizr8c.jpg

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
  • Recently Browsing   0 members

    No registered users viewing this page.