Author Topic: Converting SetMotion: MoveTo from Studio to Sierra Script  (Read 3201 times)

0 Members and 1 Guest are viewing this topic.

Offline Doan Sephim

Converting SetMotion: MoveTo from Studio to Sierra Script
« on: June 11, 2019, 05:39:00 PM »
I'm currently going through and fixing some errors in the conversion of Betrayed Alliance from Studio script to Sierra Script and I keep coming up against the same error message.
In Studio, I can can
Code: [Select]
(squirrel:setMotion(MoveTo(squirrel:x) (squirrel:y))) and it's all good to go
In Sierra,
Code: [Select]
(squirrel setMotion: MoveTo squirrel x? squirrel y?) is not something it likes at all.
Anyone have thoughts?


Artificial Intelligence Competition

Offline lskovlun

Re: Converting SetMotion: MoveTo from Studio to Sierra Script
« Reply #1 on: June 11, 2019, 05:48:26 PM »
You need a few extra parentheses:
Code: [Select]
(squirrel setMotion: MoveTo (squirrel x?) (squirrel y?))
but why would you want to do this? It's just a null mover, that may or may not cue the script (haven't checked)...

Offline Doan Sephim

Re: Converting SetMotion: MoveTo from Studio to Sierra Script
« Reply #2 on: June 11, 2019, 05:53:26 PM »
I should have chosen a different example. It doesn't like it for moving to other actors either

Offline troflip

Re: Converting SetMotion: MoveTo from Studio to Sierra Script
« Reply #3 on: June 11, 2019, 06:06:24 PM »
Each statement needs to be enclosed in ().

Accessing a property on an object counts as a statement. Thus:

Code: [Select]
(someActor x?)  ; retrieves the x property from someActor

Calling a method on an object counts as a statemtn. Thus:

Code: [Select]
(someActor setMotion: statement1 statement2 statement3)

Code: [Select]
(someActor setMotion: (blah x?) (blah y?))

It's all very logical. I'm sorry the conversion doesn't work in your case... trying to compile/parse Brian's crazy syntax was super difficult, because it's all so adhoc and permissive.
Check out my website: http://icefallgames.com
Groundhog Day Competition

Offline Doan Sephim

Re: Converting SetMotion: MoveTo from Studio to Sierra Script
« Reply #4 on: June 11, 2019, 06:14:53 PM »
That does it. Thanks.

The conversion works quite well, there were just a few hang-ups with some of my own bad coding and some Randoms that got a little mangled. All in all the conversion is nearly finished.


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

Page created in 0.043 seconds with 22 queries.