Author Topic: looking for a work around to get longer said strings  (Read 11051 times)

0 Members and 1 Guest are viewing this topic.

Offline stateofpsychosis

looking for a work around to get longer said strings
« 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?



Offline Cloudee1

Re: looking for a work around to get longer said strings
« Reply #1 on: December 10, 2014, 03:56:17 PM »
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

Halloween Competition Brass Lantern Prop Competition Groundhog Day Competition

Offline MusicallyInspired

Re: looking for a work around to get longer said strings
« Reply #2 on: December 10, 2014, 04:59:36 PM »
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!
Brass Lantern Prop Competition

Offline stateofpsychosis

Re: looking for a work around to get longer said strings
« Reply #3 on: December 11, 2014, 08:13:52 AM »
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

Offline stateofpsychosis

Re: looking for a work around to get longer said strings
« Reply #4 on: December 11, 2014, 08:41:54 AM »
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

Offline Collector

KQII Remake Pic

Offline stateofpsychosis

Re: looking for a work around to get longer said strings
« Reply #6 on: December 11, 2014, 12:52:48 PM »
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

Offline Collector

Re: looking for a work around to get longer said strings
« Reply #7 on: December 11, 2014, 03:05:53 PM »
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.
KQII Remake Pic

Offline MusicallyInspired

Re: looking for a work around to get longer said strings
« Reply #8 on: December 11, 2014, 08:57:10 PM »
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
« Last Edit: December 11, 2014, 08:59:04 PM by MusicallyInspired »
Brass Lantern Prop Competition

Offline stateofpsychosis

Re: looking for a work around to get longer said strings
« Reply #9 on: December 12, 2014, 07:30:43 AM »
oh nah that's because it's part of one of those said strings that break up (don't know the name for it)


Code: [Select]
(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!

Offline MusicallyInspired

Re: looking for a work around to get longer said strings
« Reply #10 on: December 12, 2014, 01:19:49 PM »
Ah no you're absolutely right. I forgot about that. It shouldn't cause issues then. My bad. It's been so long lol.
Brass Lantern Prop Competition

Offline stateofpsychosis

Re: looking for a work around to get longer said strings
« Reply #11 on: December 12, 2014, 01:46:47 PM »
it's all good ;)


SMF 2.0.19 | SMF © 2021, Simple Machines
Simple Audio Video Embedder

Page created in 0.316 seconds with 21 queries.