View unanswered posts | View active topics It is currently Fri Apr 19, 2024 2:00 pm



Reply to topic  [ 5 posts ] 
 Does this make sense to you? 
Author Message
Commander
User avatar

Joined: Mon Oct 29, 2001 3:00 am
Posts: 1096
Location: Tucson, AZ
Unread post Does this make sense to you?
I'm writing various tutorials for Weapon M. This one is part of the series on scripting. Does it make sense to you? Is there anything in particular that isn't clear?

https://sourceforge.net/p/weapon-m/wiki ... ogramming/

_________________
Suddenly you're Busted!


Thu Dec 13, 2012 1:53 am
Profile WWW
Boo! inc.

Joined: Fri Jan 04, 2002 3:00 am
Posts: 221
Location: Canada
Unread post Re: Does this make sense to you?
some of them are a little complex for a beginner, for example your event driven description. Overall though, it is a good article. I am looking forward to being able to read some of your krum api docs so i can start to study it up.

I also went through some of your other docs and am looking forward to reading more

one thing that I don't quite understand is how you organize your scripts. you talk about a standard directory for scripts. for example standard.AutoPause does that mean its in the scripts directory under a directory standard?

so kind of how mombot separates commands into directories? so you could in theory start putting CitKill into a Offensive directory. which would then be referenced as combat.CitKill ?? as well as say PPT and SDT in a Cashing directory? i'm just trying to compare to how mombot has you sort things out.


Thu Dec 13, 2012 10:20 pm
Profile
Commander
User avatar

Joined: Mon Oct 29, 2001 3:00 am
Posts: 1096
Location: Tucson, AZ
Unread post Re: Does this make sense to you?
Tweety wrote:
one thing that I don't quite understand is how you organize your scripts. you talk about a standard directory for scripts. for example standard.AutoPause does that mean its in the scripts directory under a directory standard?


Short answer: yes.

Java has a concept of "classpath" which is kind of like the path that your system searches for programs. It's a list of directories and/or jar files where ClassLoaders look for classes. Classes are organized into packages, and package names correspond to directory names relative to the classpath. (That's a Java thing, not my idea.)

The ClassLoader for scripts is created with a classpath that is determined by one of the application's config options, and the default value is a relative path, "scripts". If the program is installed in C:\WeaponM, and you run it from that directory, the relative path "scripts" resolves to C:\WeaponM\scripts. The ClassLoader would then look for the class "standard.AutoPause" in the file C:\WeaponM\scripts\standard\AutoPause.class.

_________________
Suddenly you're Busted!


Fri Dec 14, 2012 1:27 am
Profile WWW
Boo! inc.

Joined: Fri Jan 04, 2002 3:00 am
Posts: 221
Location: Canada
Unread post Re: Does this make sense to you?
looks good to me


Fri Dec 14, 2012 10:52 pm
Profile
Gunnery Sergeant

Joined: Thu Feb 07, 2008 10:02 pm
Posts: 23
Unread post Re: Does this make sense to you?
Mongoose wrote:
I'm writing various tutorials for Weapon M. This one is part of the series on scripting. Does it make sense to you? Is there anything in particular that isn't clear?

https://sourceforge.net/p/weapon-m/wiki ... ogramming/


Is this an answer to my hopes and dreams? A paradigm that will reduce the ugly nesting of TextLineTriggers required to create a state machine to combine the simplest of two scripts? Looks awesome.


Mon Dec 17, 2012 12:12 am
Profile
Display posts from previous:  Sort by  
Reply to topic   [ 5 posts ] 

Who is online

Users browsing this forum: No registered users and 6 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by STSoftware.