Author Topic: Props and walking into them  (Read 1693 times)

0 Members and 1 Guest are viewing this topic.

Offline Doan Sephim

Props and walking into them
« on: June 25, 2013, 11:16:32 AM »
So props and Acts have a property where actors get stopped by them when walking into them and we know that "line" is at the base of the VIEW. My question is can I increase that "stopping" line to be not just a line, but more of a rectangle, obstructing actors from moving past them from right to left so easily?

Before you say just use a control line like Brian's tutorial recommends, please note that I want this object to be movable by the player, so static control lines won't suffice.


Artificial Intelligence Competition

Offline gumby

Re: Props and walking into them
« Reply #1 on: June 26, 2013, 07:25:07 PM »
My only idea would be to implement a few more invisible/transparent views and place them a pixel above and below the actor/prop.  Then when the view is moved, you'd have to move these views as well.
In the Great Underground Empire (Zork port in development)
Winter Break 2012 Rope Prop Competition

Offline Doan Sephim

Re: Props and walking into them
« Reply #2 on: June 26, 2013, 09:26:02 PM »
That is an interesting work around, but painful for heap space and not very elegant. I may just scrap the idea I was going to use for this, or more likely, truncate it a bit.

I wondered whether I could tinker with the prop class, but when I read that code it really hits me how little I understand the basic framework.

I'm sure I'll be back again with other burning questions (which is good because it means I'm working on the game) :)

Offline lskovlun

Re: Props and walking into them
« Reply #3 on: July 18, 2013, 05:48:42 PM »
Are you looking for the yStep property, by chance? I'm not sure I understand what you mean...

Offline lskovlun

Re: Props and walking into them
« Reply #4 on: July 18, 2013, 06:54:51 PM »
Actually, it occurred to me, that you probably want a base setter. There is actually an example of this (called NormalBase) in main.sc, so copy that and change it to suit your needs. Then activate it by setting the baseSetter property in your actor to point to it in your room's init.

The startRoom of the template game has this in it:
Code: [Select]
               (if(== gTheSoundFX 11)
                        (send gEgo:baseSetter(NormalBase))
                )
which you probably want to delete, since it may override your changes in this respect.


SMF 2.0.14 | SMF © 2017, Simple Machines
Simple Audio Video Embedder

Page created in 0.078 seconds with 23 queries.