Thanks for your replies guys :)
I think about my problem a little more, i'm going to try to explain but i'm not event fluent for now in construct :D
So i would like to make that : By pressing fast the fire button, this will activate or help to activate the shield.
OnKeyPressed
if(end+0.2<=now){ // 0.2 is in seconds (0.2s maximum between 2 keyPress)
Timer.begin; // reset of time begin
}
On KeyRelease
Timer.SetEnd(now);
Every 0.1 second
if(begin-end>=1.5){ // 1.5 in seconds
SpawnNewObject(Shield);
}
I think the algorithm is ok how can i translate thoses if statement in event?
Few explanations :
Timer wouls be an object with 2 members (begin and end)
begin represents the most recent time of key pressed (with a rule of buffering if the last one was less or equal to 0.2 seconds before the next one)
end represents the most recent time of key release