Building & Scripting > Scripting Board
How Do I???
Mordecai:
Making someone sleep or awake, or resting can be done using the position variable, whch you won't have known about.
nop %actor.pos(sleeping)%
nop %actor.pos(resting)%
nop %actor.pos(sitting)%
nop %actor.pos(standing)%
nop %actor.pos(stunned)%
nop %actor.pos(dead)%
dg_cast spells are prone to being blocked by the actors spell defenses if they are aggressive, and some spells have a low chance of success in any case, and the dg_cast mob (yes, an actual mob casts the spells), has a chance of failing the spells too.
dg_affect however always works, no chance of failing.
But I would hope you would test out what the affect is going to be.
Such as, the AFFECT sleep, causes people not to wake up.
The SPELL sleep puts them to sleep.
Molly:
Hmm, to make sure that I've got this right:
What I want to do is to force a player to sleep and then transfer them to another room, and not being able to wake up on their own, until another script does it in the new room.
So the procedure would be to have the first script do:
dg_affect %actor% sleep
and then the second script could be a greet trigger, doing:
nop %actor.pos(sitting)%
Is that how the forced sleep - wake could work?
As for the other script, the mob is casting heal on itself. That cannot really be blocked by any defensive spells, but the script still doesn't work.
I don't suppose there is a way for a mob to heal itself with dg_affect?
Or should I do this instead?
eval heal %self.maxhitp%
%damage% %self% -%heal%
Diandra:
And it seems that using the position variable isn't the solution either as the code doesn't even recognize the field.
[ Trigger: Something, VNum xxxx. unknown char field: 'pos' ]
Is all you get when you try
nop %actor.pos(stunned)%
or
nop %actor.pos(sitting)%
in a script.
Molly:
I believe it is %actor.position(stunned)%, not %actor.pos(stunned)%
Diandra:
Nope, doesn't work either.
Using 'position' doesn't give an error but the position of the %actor% doesn't change either.
So either way, it seems that nor %actor.position(stunned)% nor %actor.pos(stunned)% is working.
Navigation
[0] Message Index
[#] Next page
[*] Previous page
Go to full version