Login
User Name:

Password:



Register
Forgot your password?
Vote for Us!
tintin++ ogg sound player script for linux
Author: Robert Smith
Submitted by: Vladaar
6Dragons ogg Soundpack
Author: Vladaar
Submitted by: Vladaar
6Dragons 4.4
Author: Vladaar
Submitted by: Vladaar
LoP 1.46
Author: Remcon
Submitted by: Remcon
LOP 1.45
Author: Remcon
Submitted by: Remcon
Users Online
CommonCrawl, Bing

Members: 0
Guests: 9
Stats
Files
Topics
Posts
Members
Newest Member
481
3,739
19,386
621
KellieBusb
Today's Birthdays
There are no member birthdays today.
Related Links
» SmaugMuds.org » General » Coding » Mob Variables
Forum Rules | Mark all | Recent Posts

Mob Variables
< Newer Topic :: Older Topic >

Pages:<< prev 1 next >>
Post is unread #1 Dec 19, 2005, 10:59 pm
Go to the top of the page
Go to the bottom of the page

Demosk

GroupMembers
Posts4
JoinedDec 13, 2005

Hello again,

I finally got the mob variable snippet to work in a limited manor. I striped out the pointer abilites out of it till i can get this to work the way i want. The problem Im having is the scope of these variables. When the mob runs the program it works great but as soon as you go to use the variable in another prog on the same mob its gone allready. Example. Set Setvar 1 $n when char enters room. When char leaves room check $1 OPPS its unset.
If I remove the reset functions for the variables out of mprog_driver then the variables are shared with all mobs and that just wont work. Either i have the reset function in the wrong place in mprog_driver or this just wont work for me with out some redoing. What i would like to do is set the variables to the mob and only have them reset when the mob dies or the var is reset with setvar. I would need this so each instance of the mob could have different variables. How would I go about doing this. Would i have to actually set new variables for mobs in general and then have the setvar function set the ch->var1 etc. Where in the code would i have to add these variables so mobs would have them. Thank you in advance.
       
Post is unread #2 Dec 20, 2005, 4:33 pm
Go to the top of the page
Go to the bottom of the page

Samson
Black Hand
GroupAdministrators
Posts3,643
JoinedJan 1, 2002

I'm not familiar with this snippet so I'm not sure exactly what's going on but doesn't sound right for it to reset a variable you set on an affected mob. What does the statement for setting the variables look like? You might be right about it needing to be ch->var1 etc.
       
Pages:<< prev 1 next >>