delaying time

If you are a new Irrlicht Engine user, and have a newbie-question, this is the forum for you. You may also post general programming questions here.
Post Reply
irrlicher
Posts: 9
Joined: Sat Jul 01, 2006 9:27 am

delaying time

Post by irrlicher »

I'm making a FPS game with Irrlicht but i've a question about using times:
I've made a spark to my weapon and when i click on left mouse i want to appear that spark for 100 miliseconds and then disappear it.How can i make it?
Thanks in advance!
Do you think 13 year aged children can't make 3d games? :)
stodge
Posts: 216
Joined: Fri Dec 05, 2003 5:57 pm

Post by stodge »

If the spark is a particle, set its lifetime to 100ms. I'm not familiar with the particle system in Irrlicht.
irrlicher
Posts: 9
Joined: Sat Jul 01, 2006 9:27 am

Post by irrlicher »

i'm afraid it is a billboard :( I load a image into billboard and set it's position to weapon.
Do you think 13 year aged children can't make 3d games? :)
cadue
Posts: 72
Joined: Mon Mar 13, 2006 8:33 pm
Location: Italy - Friuli - Monfalcone - Staranzano

Post by cadue »

you can use a delete animator!

Code: Select all

ISceneNodeAnimator* delete = smgr->createDeleteAnimator(time);
node->addAnimator(delete);
Anyway I think a children 13 years old can make a 3d games...I'm 14 and I studied programming when I was 12...
:)

I've created a FPS a month ago...(whitout the enemy's intelligence). I've created the shots, the decals of the shots, jump, recoil of the gun, the movement of the gun while you're moving...
Tomorrow I'll start a travel, if not I wold be happy of help you! W the joung programmers!
excuse me for my bad english and for my ignorance...but I'm 14 and i come from Italy, where the study of english is a optional (-:
irrlicher
Posts: 9
Joined: Sat Jul 01, 2006 9:27 am

Post by irrlicher »

Really?? I'm very pleased to found a young programmer at last :D I thought i am the only young programmer in this forum. I began to programming when i was 12 too and i'm 13 now :D

However i don't use a animation :( i make a billboard scene node set it's picture and i change it's lightning to appear and disappear.However i couldn't set the time correctly.When the user left clicks i do these:

Code: Select all

{
bill->setMaterialFlag(video::EMF_LIGHTING, false);
bill->setMaterialFlag(video::EMF_LIGHTING, true);
}
But it changes in a milisecond and i can't keep it.It appear and disappear immedetly.That's my problem and i'm trying to track this.

Anyway thanks for your reply!!Nice to meet you and good journey!!! :)
W the joung programmers!!!
Do you think 13 year aged children can't make 3d games? :)
cadue
Posts: 72
Joined: Mon Mar 13, 2006 8:33 pm
Location: Italy - Friuli - Monfalcone - Staranzano

Post by cadue »

Why the deleteAnimator donesn't work? The deleteAnimator deletes the node when the time you set is expire. It's simple to use:

Code: Select all

if(shot){
   IBillboardSceneNode* effect = smgr->ad.....blablabla;
   ISceneNodeAnimator* delete = smgr->createDeleteAnimator(100);
   effect->addAnimator(delete);
}
perhap you think that a delete animator delete the animator....but the DeleteAnimator drop the node!. I've used it in my FPS and it works very well.

Instead of change the lighting you can set "false" the visible in this way:
node->setVisible(false);
When I'll return from the journey I want know all about you project....my e-mail and MSN is: cadue90@gmail.com (I was born in 1991, but i commited an error when i wrote my e-mail) :roll:
See u soon
excuse me for my bad english and for my ignorance...but I'm 14 and i come from Italy, where the study of english is a optional (-:
irrlicher
Posts: 9
Joined: Sat Jul 01, 2006 9:27 am

Post by irrlicher »

That worked now!!Thanks a lot dude!I'll tell you a lot if you want my msn is:
masterprog2005@hotmail.com you can send mails there too.
See you and thanks a lot again! 8)
Do you think 13 year aged children can't make 3d games? :)
Post Reply