Welcome to Open Carnage

A resource for Halo 1 modding and tech, with unique means of rewarding individual content creation and support. Have a wander to see why we're worth the time! EST. 2012

Vic Firth

Custom Commands Accidentally Triggering Multiple Custom Events

Hello Everyone, If anyone can help me with this it would be very much appreciated. I am trying to set up an economy system following the directions in the SAPP Manual.

I have

var_add money 4

in my sapp init file. And I have the following below as some of my commands.

heal1 'cevent heal1 $n' -1
heal2 'cevent heal2 $n' -1
heal3 'cevent heal3 $n' -1
am1 'cevent am1 $n' -1
am2 'cevent am2 $n' -1
am3 'cevent am3 $n' -1

I have made these custom events tied to the custom commands.
 

event_custom $ename=heal1 $money>=10 'var_set money -10 $n;hp $n 1;rprint $n "100% Health"'
event_custom $ename=heal2 $money>=20 'var_set money -20 $n;hp $n 2;rprint $n "200% Health"'
event_custom $ename=heal3 $money>=30 'var_set money -30 $n;hp $n 3;rprint $n "300% Health"'
event_custom $ename=am1 $money>=10 'var_set money -10 $n;ammo $n 200 5;rprint $n "200 Ammo All Weapons"'
event_custom $ename=am2 $money>=20 'var_set money -20 $n;ammo $n 350 5;rprint $n "350 Ammo All Weapons"'
event_custom $ename=am3 $money>=30 'var_set money -30 $n;ammo $n 500 5;rprint $n "500 Ammo All Weapons"'

The problem I am having is players will type a command such a am1 or heal3, and it wont always trigger the right event and/or it will trigger multiple wrong events not associated with the command.
Can anyone help me? I have re read the section on custom commands and events over and over and I don't know what I am missing.

Share this post


Link to post
Share on other sites

Members of Open Carnage never see off-site ads.

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.