Install Steam
login
|
language
简体中文 (Simplified Chinese)
繁體中文 (Traditional Chinese)
日本語 (Japanese)
한국어 (Korean)
ไทย (Thai)
Български (Bulgarian)
Čeština (Czech)
Dansk (Danish)
Deutsch (German)
Español - España (Spanish - Spain)
Español - Latinoamérica (Spanish - Latin America)
Ελληνικά (Greek)
Français (French)
Italiano (Italian)
Bahasa Indonesia (Indonesian)
Magyar (Hungarian)
Nederlands (Dutch)
Norsk (Norwegian)
Polski (Polish)
Português (Portuguese - Portugal)
Português - Brasil (Portuguese - Brazil)
Română (Romanian)
Русский (Russian)
Suomi (Finnish)
Svenska (Swedish)
Türkçe (Turkish)
Tiếng Việt (Vietnamese)
Українська (Ukrainian)
Report a translation problem
That said an oldHealth varible would work just fine for the blood and be relativly easy to impliment. If your simply going to have one check for it I'd set it right after the check in order to illiminate the chance of the health changing between the last check and the oldhealth = health. (for example if you checked oldhealth then the enemy step event or whatever happened and the player was damaged and then in the end step event you set oldhealth=health you'll completely miss the damage in the oldhealth check)
I cannot get it to work, though. I've tried placing the invuln code at the start of the step event, at the end of the step event, and in the Begin Step event, but I can't get it to work. I'll touch an object that does 10 damage to the player, but the invulnrability won't activate. Anyone maybe know why?
And since this will be a very fast detection, add a particle effect to it such as the default explosion.
Turned out that the best thing was to put the on-hit effects and the oldhp varaible storage into the same script. Just put the on-hit effects at the top, and make storing oldhp the last thing the script does and it works out well. Thanks again!