intfiction.org

The Interactive Fiction Community Forum
It is currently Sun May 19, 2013 2:04 am

All times are UTC - 6 hours [ DST ]




Post new topic Reply to topic  [ 4 posts ] 
Author Message
 Post subject: Trouble Again
PostPosted: Sat Apr 21, 2012 3:55 am 
Offline

Joined: Mon Apr 16, 2012 12:12 pm
Posts: 56
Location: South Africa
I'm having trouble again. As some of you know I'm creating a battle-system but my latest problem is that when I have similarly named weapons the gamealways assumes the one the player is talking about is the one he's carrying. For example there are to bronze swords, Both carried by the player. If he attempts to equip them the game always tries to equip the same one. Is their code to tell the game to always equip the unequipped one?

_________________
Ever notice how the "happy face :)" looks more like a "trying to pass gas face"


Top
 Profile Send private message  
 
 Post subject: Re: Trouble Again
PostPosted: Sat Apr 21, 2012 4:03 am 
Offline

Joined: Sat Mar 19, 2011 7:40 am
Posts: 103
yes


Top
 Profile Send private message  
 
 Post subject: Re: Trouble Again
PostPosted: Sat Apr 21, 2012 4:15 am 
Offline

Joined: Sat Jul 09, 2011 2:09 am
Posts: 19
More helpfully, you're going to want to use a "does the player mean..." I don't know how you've set your system up, but the below might be something to start with. Adapt it to fit your system. Also, I actually doubt it will work perfectly without any fixes, but it's intended more as something to get you thinking.
Code:
Does the player mean wearing an unworn sword: it is likely.
Does the player mean wearing a worn sword: it is unlikely.


Top
 Profile Send private message  
 
 Post subject: Re: Trouble Again
PostPosted: Mon Apr 23, 2012 12:52 pm 
Offline

Joined: Wed Feb 29, 2012 2:00 pm
Posts: 672
You can also use the more general form and have similar rules for taking off.

Code:
Does the player mean wearing something:
if the player wears the noun begin;
it is unlikely;
otherwise;
it is likely;
end if.

Does the player mean taking off something:
if the player wears the noun begin;
it is likely;
otherwise;
it is unlikely;
end if.


These will pretty much work straight out of the box without any further modifications.

Hope this helps.

_________________
"Will you stop breaking the fourth wall? It's costing me an absolute fortune to replace it!"


Top
 Profile Send private message  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 4 posts ] 

All times are UTC - 6 hours [ DST ]


Who is online

Users browsing this forum: No registered users and 1 guest


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® Forum Software © phpBB Group