Building & Scripting > Scripting Board

Scripted Quest Rewards you would like to see

<< < (2/3) > >>

erwin:
Rynald!

Edit: Actually, I have a list of questions about triggers - if you could help answer them, that will be great!

1) Can triggers be attached to mobs? I dimly recall this being broken, but I'm not sure. If they can, what would the appropriate syntax be?

2) Can we really, really, really set up a wiki for script syntaxes?

Thanks!



rynald:
1) You can attach a trigger to something from a script with: attach <trigger vnum> <id>. I didn't get any problems when putting one on a mob.

2) I've asked TBA for permission to mirror their old dg script reference pages on our site. If that doesn't work out we can take a stab at a wiki, but i'll need to work with Opie on that.

rynald:
The pages are online after all: http://old.tbamud.com/Oasis_DG_pages/.

There have been changes to scripting, but most of it still applies to our scripts.

erwin:
Great, thanks :)

One more question: What would be needed if I wanted a pointer to a mob, in order to get the mob to do stuff?

Say for example, I created a mob (not necessarily a unique name), with unique ID 12345, and then:


--- Code: ---set mobPointer %self.id%
remote mobPointer %actor.id%

--- End code ---

The variable 12345 is stored on the player. However, if I wanted to do the following:

a) Force the mob to do something
b) Find the room the mob is in

what would the appropriate syntax be? At the moment, I've tried


--- Code: ---%force% %mobPointer% jump
%echo% %%mobPointer%.room%

--- End code ---

which admittedly doesn't work, since the number stored in mobPointer could represent a string / object / room / anything else instead - so I'm not even sure if I'm storing the right variable.

So yeah, what would I need to do to get this to work? Thanks again!



rynald:
When you have the id of something you can control it with makeuid:


--- Code: ---makeuid mob %id%
%force% %mob% sit
%echo% %mob.room%

--- End code ---

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version