Community
SCI Programming => SCI Syntax Help => Topic started by: stateofpsychosis on December 10, 2014, 01:53:35 PM
-
Hi,
I want to be able to have the user say
use hole punch with pipe
I noticed you can get 2 word objects to work by making the 2nd word a verb
(probably a better way than this)
but when i want to use something with something else
that work around becomes useless...
anybody got any suggestions for this?
I'm thinking maybe it's something I can solve in the vocab?
-
You may want to read through the tutorials about advanced said string that Gumby put up in the how to section. Pretty sure this sort of thing was covered in them. I remember Brandon had a very similar issue with his KQ remake regarding "basket of goodies"
Other than that, I am not the guy to help in this situation. I haven't actually used a said string in a game in a couple of years now at least.
These may help
http://sciprogramming.com/community/index.php/topic,360.html
http://sciprogramming.com/community/index.php/topic,351.html
http://sciprogramming.com/community/index.php/topic,352.html
-
Definitely read those tutorials Gumby made. He unveiled a lot of what was a mystery since SCI Studio's inception regarding said strings and the parser itself in general. It definitely helped me a lot!
-
nice, it worked
unfortunately something went seriously wrong after implementing this
now I can't open my inventory in that room... says "you can't do that here. at least not now"
one of the ego's view goes missing so he's moon walking in one direction :P
and when you try to go back into the room it says "out of heap space"
damnit :P
-
k, now i went through and deleted some stuff out of the vocab that I had before doing this
and that fixed those problems...
now it crashes every time i open the toolbox the hole punch is in
god
i'm going to keep playing with the vocab and see if i can fix this
-
For the out of heap see http://sciwiki.sierrahelp.com/index.php?title=Memory_Management
-
kk, I'll check that out because I want to know how to do this both ways
but I used the other method of using qualifying adjectives and I'm glad to say that worked a lot smoother. I was trying that before but I had them backwards.... example: ('/hole<punch>') instead of ('/punch<hole>')) as it should be
-
Even if your change in approach fixed your immediate problem, it is still a good idea to be aware of memory management to avoid the out of heap error.
-
Just a note, the right angled brackets here are not necessary and could be causing you problems:
example: ('/hole<punch>') instead of ('/punch<hole>')) as it should be
-
oh nah that's because it's part of one of those said strings that break up (don't know the name for it)
(if(Said('use>'))
(if(Said('/keys>'))
(if(Said('//lighter'))
(if(send gEgo:has(INV_KEYS))
(if(send gEgo:has(INV_DEADLIGHTER))
Print("You remove the metal top of the lighter with your keys, take the flint and discard what's left of the dead lighter.")
(send gEgo:get(INV_FLINT))
(send gEgo:put(INV_DEADLIGHTER))
)
(else Print("You don't have a dead lighter."))
)
(else Print("You don't have any keys."))))
(if(Said('/scissors>'))
(if(Said('//firework'))
(if(send gEgo:has(INV_SCISSORS))
(if(send gEgo:has(INV_FIREWORK))
Print("You carefully cut away the cardboard from the firework and remove the explosive shell discarding the rest.")
(send gEgo:get(INV_EXPLOSIVE))
(send gEgo:put(INV_FIREWORK))
)
(else Print("You don't have any fireworks."))
)
(else Print("You don't have any scissors."))))
there's a ton of them after that so i won't post them all.
but yea did that mostly to practice doing it this way
It's working without issue right now
but I'll keep that in mind as something to keep my eye on in case problems occur later on
thanks!
-
Ah no you're absolutely right. I forgot about that. It shouldn't cause issues then. My bad. It's been so long lol.
-
it's all good ;)