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 Discussion / blinking images

Author
Message
D I G I T A L
21
Years of Service
User Offline
Joined: 22nd Jun 2003
Location: Dubai, UAE
Posted: 21st Nov 2003 18:58
hello people,
how do i make images blink? like in a special effects flare when a gun is firing bullets.
how do i make my gun (an object) go back and forth as a vibration when firing bullets?
thankx for advance.

‘Those who ignore the lessons of the past are doomed to repeat them’ (Napoleon)
JoelJ
21
Years of Service
User Offline
Joined: 8th Sep 2003
Location: UTAH
Posted: 22nd Nov 2003 01:48
for shaking, i would make a function that makes it move back and forth really fast, i dono if it would work real well

Two words, moo.
guru of boredom
21
Years of Service
User Offline
Joined: 12th Oct 2003
Location: middle of no where
Posted: 22nd Nov 2003 04:28
just do hide/show object or image or sprite or whatever you are using for the flashing and as for the vibration look in the iced demo code

we are not outnumbered! we are just in a target rich enviroment!
P4 2.4 ghz 120 GB 256 mb GeForce4
D I G I T A L
21
Years of Service
User Offline
Joined: 22nd Jun 2003
Location: Dubai, UAE
Posted: 22nd Nov 2003 16:22 Edited at: 22nd Nov 2003 16:24
EthanSbored
i'm using a MOUSECLICK() command i cant HIDE and SHOW an item when using that command, its either hide or show. so i cant just say
"if mouseclick()=1 then hide sprite : show sprite", it makes no sence.
as for the iced demo, he shoots only a single bullet, i'm using a machine gun sorry if i didnt tell u that! i dont need a realistic vibration, a trick on positions would do, just how can i change positions repeatedly (eg. position object gun,2,2,3 : position object gun,2,2,-3)

‘Those who ignore the lessons of the past are doomed to repeat them’ (Napoleon)
John H
Retired Moderator
22
Years of Service
User Offline
Joined: 14th Oct 2002
Location: Burlington, VT
Posted: 22nd Nov 2003 17:24
Have it based on a timer...

If mouseclick=1
inc mousefire,1
if mousefire>0 then show sprite 1
if mousefire>1 then hide sprite 1
if mousefire=3 then mousefire=0
endif

RPGamer


Dont forget to Join the Forums!
guru of boredom
21
Years of Service
User Offline
Joined: 12th Oct 2003
Location: middle of no where
Posted: 23rd Nov 2003 00:16
just do the vibration repeatedly. and as for the show and hide image i meant use show or hide so like:
if fire=1 then show image 1
if fire=0 then hide image 1

we are not outnumbered! we are just in a target rich enviroment!
P4 2.4 ghz 120 GB 256 mb GeForce4
D I G I T A L
21
Years of Service
User Offline
Joined: 22nd Jun 2003
Location: Dubai, UAE
Posted: 24th Nov 2003 14:16
couldnt come up with any satisfying results i'll have to see an example of some kind or any kind that is related to image blinking.
thank u

‘Those who ignore the lessons of the past are doomed to repeat them’ (Napoleon)

Login to post a reply

Server time is: 2025-05-21 16:35:06
Your offset time is: 2025-05-21 16:35:06