Animated doors

Started by R4L, Mon 23/08/2004 15:12:44

Previous topic - Next topic

R4L

I think I already know how to do this but I don't think it's right. If I want animated doors do I make a door for an object? If I make a region do I have it so when player walks on it the script plays an animation for the object and followed by that have set object view to where the doors stay open? Sorry if I am making it sound complicated.

Kinoko

I assume you mean something like the automatic doors of a shop? If so, you have the right idea, as far as I can see.

BlackMan890

#2
i have a question, does the object need a walking space? or does he need it if he chooses moving the door?

also, Rap4Life42o, if you already solved this proplem, please show a thumb up so we know it is solved, cause i hate people who solved their proplem and do not showe it to the others
Jonatan Nilsson
860 Iceland

Please go to www.simnet.is/elinnils52 and download my non ags/adventure game :)

Darth Mandarb

Either way you should make the door an object, and you make it animated opening (and closing if you need it).

Now, if you want it to animate open when you perform an action you simply need to make a seperate walkable area where you walk through the door that is removed when the door is closed.Ã,  When you perform the action to open the door, restore the walkable area and run the door's animation.

If you want the door to be motion sensor like (meaning it opens autormatically when you approach) you use regions (or hotspots if you need to).Ã,  When you step on the open region it opens the door (don't need to remove a walkable area in this case).Ã,  Now I always put a second region outside the 'open' region that closes the door ... so if you approach and open the door, but then walk away, it'll close.

Note: If you're using hotspots instead of regions you'll need to make the open one active initially, and the close one disabled.Ã,  When you step on the open hotspot you'll then disable it and enable the close hotspot (and vice-versa with the close hotspot) otherwise the door animation will go crazy on you and won't look right!

R4L

Thanks Darth Mandarb! I am getting the room set up now.

Guartho

How do I get the walkable area to be gone and reappear on command? Ã, I have a separate walking area, but I can't seem to do anything special to it. Ã, I can't even find an interactions menu. Ã, If it's a scripting thing, could someone show me the code structure for calling the walkable area and turning it on and off?  I can't seem to find it in the manual so if it's in there, could someone just tell me the area to look under?


thanks 

Scummbuddy

RestoreWalkableArea
RemoveWalkableArea
- Oh great, I'm stuck in colonial times, tentacles are taking over the world, and now the toilets backing up.
- No, I mean it's really STUCK. Like adventure-game stuck.
-Hoagie from DOTT

guartho

wow! what a swift response! thanks  I've tried placing that in a script and I can disable the walkable area and re-enable it.  Where do I need to put the RemoveWalkableArea command to have the "door" shut when the room loads up?

guarhto

sorry to double post, but I have some more info.  I tried just putting it at the top of the room script, but I think it needs to be inside a function or something.

Albert Cuandero

Look the

RemoveWalkableArea and RestoreWalkableArea chpters in the manual.

I would put it in the regions Interactions, somthing like this (assuming your area is #3):

Player walks off region - run script - (edit script) RemoveWalkableArea (3)

Player walks on region - run script - (edit script) RestoreWalkableArea (3)

In the room's main interactions you can specify if the door should be open or closed when the character enters the room.

romm/settings/interaction editor - Player enters screen bef/aft fade-in - run script - (edit script) RemoveWalkableArea (3)
int do_you_like_me;
if (do_you_like_me == 1) Display ("You can call me Al");
else {}

SMF spam blocked by CleanTalk