Author Topic: Giving command to animate  (Read 3636 times)

0 Members and 1 Guest are viewing this topic.

Offline gumby

Giving command to animate
« on: November 24, 2010, 07:54:12 PM »
Does the SCI0 parser support this?  Example:  troll, put the axe on the ground

I don't ever remember doing anything this complex in SCI.  Basically the parser would have to parse the 'intended animate object' first, then apply the rest of the command to the intended (rather than the 'default', which is first person, the ego/player - right?).

If it doesn't, I can probably hack something together to give us that functionality...


In the Great Underground Empire (Zork port in development)
Winter Break 2012 Rope Prop Competition

Offline gumby

Re: Giving command to animate
« Reply #1 on: November 26, 2010, 05:30:10 PM »
I've got this implemented.  Will write it up soon in the how-to section. 
In the Great Underground Empire (Zork port in development)
Winter Break 2012 Rope Prop Competition

Offline MusicallyInspired

Re: Giving command to animate
« Reply #2 on: November 26, 2010, 05:43:51 PM »
You mean, the parser interpreting something and cuing a procedure without actually coding it in?
Brass Lantern Prop Competition

Offline gumby

Re: Giving command to animate
« Reply #3 on: November 26, 2010, 06:35:59 PM »
You mean, the parser interpreting something and cuing a procedure without actually coding it in?
I'm using the same technique as with the 'basket of goodies' trick.  I check to see if there is an 'animate' being referenced at the very beginning of the input string, set a global 'gActor' variable, strip it off & re-parse the string.  You can then use the global variable for additional logic, like this:

Code: [Select]
(if (== gActor PLAYER)  // player is the 'default'
    (if(Said('jump'))
       Print("You jump up-and-down like an idiot")
    )
)

(if (== gActor TROLL) // another animate in the game
    (if(Said('jump'))
       Print("The troll is much too dignified for such an action and politely refuses your offer")
    )
)

So the first statement would apply to an input string of 'jump'.  The 2nd would apply to an input string of 'troll, jump'.
In the Great Underground Empire (Zork port in development)
Winter Break 2012 Rope Prop Competition


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

Page created in 0.033 seconds with 22 queries.