Go Back   the Magicball Network > Forums > LBA Modifications > LBA Modifications - General
Buy LBA1/Relentless from GOG.com Buy LBA1/Relentless from DotEmu Buy LBA2/Twinsen's Odyssey from DotEmu Buy LBA2/Twinsen's Odyssey from GOG.com Buy Little big Adventure from GOG.com or DotEmu Buy Little big Adventure 2 from DotEmu or GOG.com

Welcome to the Magicball Network.

You are currently viewing our site as a guest which gives you limited access to view most discussions and access our other features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content and access many other special features. Registration is fast, simple and absolutely free so please, join our community today!

If you have any problems with the registration process or your account login, please contact contact us.

Reply
 
Thread Tools
  #1  
Old 2009-01-13, 20:26
Vindish's Avatar
Vindish Vindish is offline
Let's revive Twinsen !
 
Join Date: Nov 2008
Location: France
Posts: 51
Send a message via MSN to Vindish
Open door

Hello guys, i'm trying to code a simple thing : open/close a door

But it reveal as an impossible mission ^^
In fact, i copy an original code from a door existing in LBA1, and i paste it in my map, but, even if i hear the sound meaning the door is opening, i can't see it.
I'll give you an extract of the actor, and i hope someone will be able to help me.

sprite : door #2

mode : clipping left : -64
clipping top : 17
right : 0
bottom : 144

statics flag (checked) : can collide with objects
use clipping
is sprite
doesn't cast shadow
carrier

script : COMPORTEMENT main
SET_DOOR_LEFT 1550
SET_COMPORTEMENT 1
END_COMPORTEMENT
COMPORTEMENT 1
IF DISTANCE 0 > 3000
SET_TRACK 1
SET_COMPORTEMENT 2
ENDIF
END_COMPORTEMENT
COMPORTEMENT 2
IF COL_OBJ 0 == 1
SET_TRACK 0
SET_COMPORTEMENT 1
ENDIF
END_COMPORTEMENT
END

track : LABEL 0
BACKGROUND 0
SAMPLE 35
OPEN_LEFT 1500
WAIT_DOOR
STOP
LABEL 1
SAMPLE 35
CLOSE
WAIT_DOOR
BACKGROUND 1
STOP
END
__________________
I love LBA, I love France !
LID demo v1.0 on fire !!! http://www.mediafire.com/?mt42t00tzmq
You also can test my mod : my mod
Reply With Quote
  #2  
Old 2009-01-13, 21:15
LBAWinOwns's Avatar
LBAWinOwns LBAWinOwns is offline
Magic Ball Master
 
Join Date: Mar 2004
Location: Sweden
Posts: 5,570
Send a message via MSN to LBAWinOwns
If you hear the sound when colliding with the door (which seems to be LABEL 0). Then the code seem to be working. And if it's not a code problem, check if the actor properties are equal

Only thing with the code that seems unexplainable to me is the OPEN_LEFT 1500, why 1500 ? Has other door actors also 1500?

Good luck
__________________

LBA Image Creator project
(image by leoboe! )

Get the Jump-Save-Bug graphically explained here
Reply With Quote
  #3  
Old 2009-01-13, 23:03
Inventor's Avatar
Inventor Inventor is offline
Magic Level: Red Ball
 
Join Date: Mar 2006
Location: Finland
Posts: 164
It might be that if you just duplicated the values from a existing scene in LBA, and didn't modify the clipping values, then the door is probably invisible because its not properly positioned with its clipping region.

This is because the clipping values are not relative to the actor, but absolute to the grid. So only if the door is at the exact same spot as in the original scene it will get properly clipped.

So if this is the case, you'll have to figure out the clipping values for the door yourself, by checking the 'clipping' coordinates in architect, for the area in which the door should be visible. (eg. any part of that actor going outside of this area in screen will not be drawn.)

Hope this helps at all
__________________
Try out my LBA1 maps:
Desert Base
Grobo invasion
Sewerage

try out my fan game demo Twinrunner 0.5
credits to ChaosFish for uploading the game!
Reply With Quote
  #4  
Old 2009-01-14, 00:09
LBAWinOwns's Avatar
LBAWinOwns LBAWinOwns is offline
Magic Ball Master
 
Join Date: Mar 2004
Location: Sweden
Posts: 5,570
Send a message via MSN to LBAWinOwns
Oh, you meant you can't see the door, I thought you couldn't see the animation of the door moving.

Inventor - I'm not so experienced, but what is clipping values?, shouldn't you always be able to within LBArchitect choose the actor coordinates graphically? As opposed to input them by hand.
__________________

LBA Image Creator project
(image by leoboe! )

Get the Jump-Save-Bug graphically explained here
Reply With Quote
  #5  
Old 2009-01-14, 00:25
RobG's Avatar
RobG RobG is offline
HMMV
 
Join Date: Aug 2007
Location: South Africa
Posts: 213
Send a message via MSN to RobG
Clipping co-ords are the bounds that cut the door sprite away, making it invisible. If the door is outside those bounds to start with, then the door will always be invisible.
__________________

Reply With Quote
  #6  
Old 2009-01-14, 15:30
LBAWinOwns's Avatar
LBAWinOwns LBAWinOwns is offline
Magic Ball Master
 
Join Date: Mar 2004
Location: Sweden
Posts: 5,570
Send a message via MSN to LBAWinOwns
Oh, Ok it makes sense now.

A good feature for LBArchitect would be to produce warnings if the actor is out of the clipping cord range.
__________________

LBA Image Creator project
(image by leoboe! )

Get the Jump-Save-Bug graphically explained here
Reply With Quote
  #7  
Old 2009-01-14, 22:50
Vindish's Avatar
Vindish Vindish is offline
Let's revive Twinsen !
 
Join Date: Nov 2008
Location: France
Posts: 51
Send a message via MSN to Vindish
Okay, thanks for your answers, i finally found the problem, and it was about clipping position ^^
Thanks Inventor, LBAwin and RobG, the clipping values were incorrect.
LBAwin, all the door add same value : they move 1550 in a sp├ęcial direction, i guess is the make the door slide, and due to the clipping value, we can see the door disappear from our eyes ^^

For others users that may have the same problem :
To correctly code the door, you have to face cursor on each visible side of the door, and fill clipping value you can see on the bottom right corner.

Thanks a lot guys ^^
__________________
I love LBA, I love France !
LID demo v1.0 on fire !!! http://www.mediafire.com/?mt42t00tzmq
You also can test my mod : my mod
Reply With Quote
  #8  
Old 2009-01-17, 09:55
Zink's Avatar
Zink Zink is offline
Master of Degree
 
Join Date: Sep 2001
Location: Lublin, Poland
Posts: 1,744
Typing the values by hand is the only way of setting the clipping rectangle right now, sorry. I plan to make it easier, but don't have time now. I like the idea about the warning if the clipping rect is too far from the actor.

Apart from the clipping setting, what can make a Sprite Actor invisible is setting its life to 0.
__________________
Emerald Moon Base projects: Little Big Architect - v 0.10 and v 1.0 beta 9, Package Editor - v 0.11+, Text Editor 2 - v 2.3, Font Editor - v 2.03+.
Bug reporting (hosted by alexfont).

All LBA technical information goes in here -> LBA File Information Project

LBA Prequel Demo has been released! See our blog
Reply With Quote
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
How do you open the door to retrieve tha package? Weklim First aid 4 2008-12-01 04:47
Open Source RMP Firephoenix The Relentless Movie project 29 2008-04-08 10:39
[LBA:TGR] Open tasks... MBN Bot Syndicated news 0 2006-11-01 23:30
Open Crappiness kaderoboy Fan Art 17 2002-09-17 09:08
LBA1 - door wont open!!! Savage First aid 11 2002-05-14 17:53


All times are GMT +2. The time now is 10:04.




News Feed
Powered by vBulletin®
Copyright ©2000 - 2018, Jelsoft Enterprises Ltd.
Copyright ©2000 - 2016, the Magicball Network