Under stock ROM this wouldn't happen, as the spell is fired off immediately
and there's no threading.

I can assume you've changed your code from:
c 'armor'
spell execution
spell lag

to:
c 'armor'
spell lag
spell execution

So, basically when 'spell lag' is occurring another mob enters the room.

Take the target character and record the pointer to something in the caster
char_data info:

ch->spell_target = victim;
(add this as a CHAR_DATA *)

Then when the spell executes, validaate ch->spell_target is legal (it could
have been extracted)
and then use it instead of whatever you are using now.

If I understand the problem correctly, something in this fashion should
resolve the problem.

Jason

> -----Original Message-----
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] 
> Sent: Thursday, January 02, 2003 11:04 PM
> To: [email protected]
> Subject: Moving characters into rooms...
> 
> 
> Currently when a monster enters a room it is set at the to of 
> the list. Lets say you were trying to cast a spell at the 
> first monster, and only 
> monster that was in the room, (and you weren't in combat 
> yet), suddenly the 
> same type of monster type comes in, and you cast the spell - 
> it would hit the 
> monster that just came in. What I want to do is make the 
> monster appear under 
> the current monster so you don't target the new one.
> If you do not understand what I'm talking about I'll try to 
> explain it again. I'm not sure how to do this, but I think 
> its something with char to room, but 
> I do not fully understand it.
> Thanks
> 
> -- 
> ROM mailing list
> [email protected]
> http://www.rom.org/cgi-bin/mailman/listinfo/rom
> 

Reply via email to