Graal Forums

Graal Forums (https://forums.graalonline.com/forums/index.php)
-   NPC Scripting (https://forums.graalonline.com/forums/forumdisplay.php?f=8)
-   -   created event for joined classes? (https://forums.graalonline.com/forums/showthread.php?t=64160)

jake13jake 02-17-2006 09:18 AM

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()?


All times are GMT +2. The time now is 03:41 PM.

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2026, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.