Castle Paradox Forum Index Castle Paradox

 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
 Gamelist   Review List   Song List   All Journals   Site Stats   Search Gamelist   IRC Chat Room

Shortcuting commonly used plotscript commands

 
Post new topic   Reply to topic    Castle Paradox Forum Index -> HELP!
View previous topic :: View next topic  
Author Message
Onlyoneinall
Bug finder




Joined: 16 Jul 2005
Posts: 746

PostPosted: Fri Sep 19, 2008 2:09 pm    Post subject: Shortcuting commonly used plotscript commands Reply with quote

Okay, there are a couple of scripts that I use very commonly, like setnpcdirection or walknpc. If I wanted to shortcut these commands (ie, only have to type facenpc) so I can type this stuff up faster, what do I do?

If I were to make a script called FACENPC, and that script had this:
Quote:

script,FACENPC,begin
setnpcdirection
end


would I be able to type my scripts up like this?
Quote:
FACENPC(jamespaige,west)


Since the same script would be used for multiple npcs, I would like to make sure this is the right way. Thanks.
_________________
http://www.castleparadox.com/gamelist-display.php?game=750 Bloodlust Demo 1.00

Back to top
View user's profile Send private message Send e-mail
Moogle1
Scourge of the Seas
Halloween 2006 Creativity Winner
Halloween 2006 Creativity Winner



Joined: 15 Jul 2004
Posts: 3377
Location: Seattle, WA

PostPosted: Fri Sep 19, 2008 2:48 pm    Post subject: Reply with quote

You'd need something like this:

Code:
script, facenpc, who, where, begin
 setnpcdirection(who,where)
end


Hspeak won't magic the arguments for you. Gotta put them there yourself.
_________________
Back to top
View user's profile Send private message Visit poster's website AIM Address
Onlyoneinall
Bug finder




Joined: 16 Jul 2005
Posts: 746

PostPosted: Fri Sep 19, 2008 3:12 pm    Post subject: Reply with quote

So...

Code:

script, facenpc, who, where, begin
 setnpcdirection(who,where)
end

script,facers,begin
facenpc (james,east)
facenpc (john,west)


Would work?

Thanks! I haven't ever really used arguments, but now I think I understand it better. Happy
_________________
http://www.castleparadox.com/gamelist-display.php?game=750 Bloodlust Demo 1.00

Back to top
View user's profile Send private message Send e-mail
Moogle1
Scourge of the Seas
Halloween 2006 Creativity Winner
Halloween 2006 Creativity Winner



Joined: 15 Jul 2004
Posts: 3377
Location: Seattle, WA

PostPosted: Fri Sep 19, 2008 3:17 pm    Post subject: Reply with quote

Well, you don't have an "end" on facers, but otherwise, yeah.
_________________
Back to top
View user's profile Send private message Visit poster's website AIM Address
Display posts from previous:   
Post new topic   Reply to topic    Castle Paradox Forum Index -> HELP! All times are GMT - 8 Hours
Page 1 of 1

 
Jump to:  
You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group