Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

DarkBASIC Professional Discussion / At object frame then something happens? Is it possible

Author
Message
Daniel wright 2311
User Banned
Posted: 23rd Aug 2010 07:37
Like the tital reads, what I need is when my door opens at the last frame something will happen, a sound will play, a object will be hidden. I cant seem to figure it out. any help will be nice. thanks

Logo by The Next
Van B
Moderator
23
Years of Service
User Offline
Joined: 8th Oct 2002
Location: Sunnyvale
Posted: 23rd Aug 2010 09:27
That's probably best done with plain old code logic, like rather than LOOP OBJECT, increment the frame manually, then when it hit's the last frame you can easily act on it. Say your door object has 50 frames:

F#=object frame(obj)
if F#<50.0
inc F#,1.0
if F#>=50.0
`Do stuff with opened door
F#=50.0
endif
set object frame obj,f#
endif

Health, Ammo, and bacon and eggs!
Daniel wright 2311
User Banned
Posted: 23rd Aug 2010 09:41
right, this make alot of sence now, I tryed to use object frame(obj) but realy could not come up with anything, thank you

Logo by The Next

Login to post a reply

Server time is: 2026-07-23 10:49:05
Your offset time is: 2026-07-23 10:49:05