View Single Post
  #1  
Old 02-17-2006, 09:18 AM
jake13jake jake13jake is offline
Former Classic Staff
jake13jake's Avatar
Join Date: Dec 2002
Location: Northwest Vermont
Posts: 1,452
jake13jake will become famous soon enough
created event for joined classes?

Right now I have this in my script for a boss I'm making.
PHP Code:
  temp.damage putnpc2(31,20,"join control_damage;");
  
temp.damage.attacker this;
  
temp.damage.target   player;
  
temp.damage.recoil   10;
  
temp.damage.scheduleEvent(0.5,"SetDamageField",31,20,2,2,32,0,-2,1); 
The control_damage class sets recoil to 5 on event created. However, setting the recoil in this manner isn't working because apparently the created event isn't being called until after I've already scheduled the setdamagefield event. Would anyone suggest a way of going about creating default values that wouldn't require a setter function with an internal bool and a lot less simplicity to override? This wouldn't exactly be the prime example, but it's quite annoying.

Edit: Either way, I just added it as a parameter (the only things that were using it were the new movement system that isn't added and the boss where I was having the trouble), but there are a lot of class-joining NPCs where I would want to make a default variable based on whether or not the variable has been set. You can do this with strings, but not with numbers (or as far as I know, not with numbers).

Edit: You're all a big help. Perhaps I could do something with getdynamicvarnames()?

Last edited by jake13jake; 02-17-2006 at 07:31 PM..
Reply With Quote