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.

Newcomers DBPro Corner / Enemy texture is all red when it is hit by bullet???

Author
Message
2D Analyst
AGK Developer
20
Years of Service
User Offline
Joined: 2nd May 2004
Location:
Posted: 16th Nov 2004 04:07
I can make the enemy texture change color when a bullet hit it, but my problem is that I want it to change color for 1 second then back to the orginal texture. Can someone give me an example of codes to use to do a temporary texture on the enemy then back to original texture form?? I tried alot of commands and none of them seem to work correctly. It's probably very simple, but I'm I couldn't figure it out. Thanks yall.

eatfishy
bibz1st
21
Years of Service
User Offline
Joined: 2nd Jan 2003
Location:
Posted: 16th Nov 2004 04:54
[/code]
load image "enemy_tex",1
time=0
maxtime=10
do
IF enemy_hit=1
COLOR OBJECT enemy,rgb(255,0,0)
INC time,1
IF time=maxtime
TEXTURE OBJECT enemy,1
time=0
ENDIF
LOOP
[code]
just play about with maxtime to find 1 second or use the timer
2D Analyst
AGK Developer
20
Years of Service
User Offline
Joined: 2nd May 2004
Location:
Posted: 16th Nov 2004 06:56
I know your code works, but I'm still getting the same problem I had before. When I color my object, it only color part of it. I think it must be the 3d max exporter conversion or something. Thanks for the example though. Hm.....do you know why when I color the object, only part of it get colors n the other part deletes the texture giving a dull look. It probably deals more with 3d max than with DarkBasic. Any ideas??

eatfishy
bibz1st
21
Years of Service
User Offline
Joined: 2nd Jan 2003
Location:
Posted: 18th Nov 2004 04:49
mmmm, not at the moment

Login to post a reply

Server time is: 2024-09-23 05:29:17
Your offset time is: 2024-09-23 05:29:17