Register an account now to get access to all board features. After you've registered and logged in, you'll be able to create topics, post replies, send and receive private messages, disable the viewing of ads and more!

I'm still having the issue I mentioned earlier, and I checked every bit of my code to see if it had anything related to jumping_counter, and only found this; which can't be the issue. Eitherway, I commented it out and the bug was still there. Any other ideas to solve this out?

I'm trying to make an actor reduce the player's health with a melee attack - and no, I can't just use "addphealth -%".
The attack damage is worked out by a formular which makes the attack damage higher depending on the actor's level. The actor also has access to multiple attacks but that's not really relevent.

After my formular is done, an actor at level 1 witch has an attack stat of 12 should do 4 damage to the player. That number is currently being held in a gamevar, how can I get that gamevar taken away from the player's HP? This value is also a positive value so I need to use subvar to take it away but I don't know what I'm meant to take it away since I can't edit the .extra for players.

*edit*

I've thought of a way but I would still prefere a different method.
Mine would be seomthing like this:
ifvarg TEMP 0 { addphealth -1 subvar TEMP 1 }
and then think of a way to have that loop till my attack value is empty.

Like I said, I would still prefere a better method, a more instant and direct reduction.

Have you tried getting the player being attacked's ID in the monster code, than setting their .htextra to the damage number you want to do? (so instead of addphealth -10 you'd have setplayer[THISACTOR].htextra DAMAGEVAR or something similar )

I could never get htextra to work right but I may just stick with what I posted above.
My main concern with that was it would take too long for large damage amounts to be applies - in one test the player was killed outright but it took like 5 seconds for the HP to run all the way down. I solved that by making it take off 100s till there were no 100s left then it'll move onto 50s, then 10s then finally 1s. It still takes like nearly a second to knock down the HP but I kindof like seeing it rub down through numbers instead of instantly applied.

getplayer[THISACTOR] for actors besides APLAYER refers to the nearest player, just like addphealth does. "extra" means health/strength for most actors. James's method has advantages, but is more complicated--I can't remember all the necessary details.

I want an "overlay" to appear on the screen when the night vision goggles are in use, I have a sprite to cover the whole screen to add "effect" to the nightvision goggles when they are powered on, any help?

I want an "overlay" to appear on the screen when the night vision goggles are in use, I have a sprite to cover the whole screen to add "effect" to the nightvision goggles when they are powered on, any help?

getplayer[THISACTOR] for actors besides APLAYER refers to the nearest player, just like addphealth does. "extra" means health/strength for most actors. James's method has advantages, but is more complicated--I can't remember all the necessary details.

Ahh, obtaining and altering the player's HP through the actor sructure - that's cunning!
But if that works then why can't we just have the .extra command on the player structure as well and alter it directly through that?

Ahh, obtaining and altering the player's HP through the actor sructure - that's cunning!
But if that works then why can't we just have the .extra command on the player structure as well and alter it directly through that?

Is there anyway to stop a projectile with flags of 6274 (RPG, NOENEMYHITS, LOSESVELOCITY, and NOAIM) from bouncing off of actors? I'm trying to finish up my gibs by coding the blood. The gibs bounce off stuff, which is natural, but of course blood shouldn't. Alternative ideas are also welcome.

Is there anyway to stop a projectile with flags of 6274 (RPG, NOENEMYHITS, LOSESVELOCITY, and NOAIM) from bouncing off of actors? I'm trying to finish up my gibs by coding the blood. The gibs bounce off stuff, which is natural, but of course blood shouldn't. Alternative ideas are also welcome.

Take away the NOENEMYHITS flag. That makes it bounce off of all sprites.

I thought maybe it wouldn't work quite right but that's actually pretty much perfect. D'oh.

Another tidbit I'm having trouble figuring out. The blood flies through the air, and when it hits something it spawns a bloodsplat. This looks good when it hits the ground, rather natural and the like. I can't figure out how to setup so that when it hits a wall, instead of spawning a bloodsplat it shoots BLOODSPLAT# along the walls. I can't really figure it out. There is no ifnearactor equivalent for walls, as far as I know. Any ideas?

I thought maybe it wouldn't work quite right but that's actually pretty much perfect. D'oh.

Another tidbit I'm having trouble figuring out. The blood flies through the air, and when it hits something it spawns a bloodsplat. This looks good when it hits the ground, rather natural and the like. I can't figure out how to setup so that when it hits a wall, instead of spawning a bloodsplat it shoots BLOODSPLAT# along the walls. I can't really figure it out. There is no ifnearactor equivalent for walls, as far as I know. Any ideas?

What are the ways to increase the clipdist of a projectile other than defining it in the defineprojectile part? In my case, one of the monsters shoots fireballs at the player, but they don't hit him, and just go through. I've increased the clipdist to 160 but nothing happens... (The projectile isn't even that big at all, it's a png, so I used the setuptile command to buff it's size up, maybe that's the problem. But, it's size is meant to be big) Any advice?

What are the ways to increase the clipdist of a projectile other than defining it in the defineprojectile part? In my case, one of the monsters shoots fireballs at the player, but they don't hit him, and just go through. I've increased the clipdist to 160 but nothing happens... (The projectile isn't even that big at all, it's a png, so I used the setuptile command to buff it's size up, maybe that's the problem. But, it's size is meant to be big) Any advice?

The problem isn't clipdist. The problem is that the dimensions of the tile that you have defined as the projectile are too large. I know it sounds strange, but trust me, there is an engine bug which makes large projectiles not hit the player. I've had to deal with it many times and it sucks. If you are using setuptile or dummytile, keep the dimensions down to like 16x16 to be safe. It's fine to use sizeat (or scale in the case of a model) to make it bigger in game, but the tile dimensions must be small.

The problem isn't clipdist. The problem is that the dimensions of the tile that you have defined as the projectile are too large. I know it sounds strange, but trust me, there is an engine bug which makes large projectiles not hit the player. I've had to deal with it many times and it sucks. If you are using setuptile or dummytile, keep the dimensions down to like 16x16 to be safe. It's fine to use sizeat (or scale in the case of a model) to make it bigger in game, but the tile dimensions must be small.

Oh didn't know that. Thanks for response.

Eitherway, I think the maximum clipdist value must be increased. (In case of a very very big projectile, or a monster)

This is from the "htg_t" article. How do you use htg_t for tripbomb control? I replaced it with a grenade launcher and when I fire, player halts for a very small second and then continues to move. I thought this could be from 1:Delay and would be fixed if I had turned it to 3:armed.

I'm having great difficulty in trying to do something simple.
I want a projectile to obtain the ID of who spawned it then have the projectile change its stats (damage / speed / size etc...) from collected gamevars from the spawner.

Firstly I can't seem to be able to make it know who spawned it and used a stupid method of findnearactor as a temp measure.
Secondly I can't get the projectile to change its stats, they are always the same. I.E: "setthisprojectile[THISACTOR].extra 50" does 2 damage which is what the projectile was defined at. Basically I don't appear to be able to override the default values allready defined.

I thought this was going to be easy and the thing I did this morning would be hard but it turned out to be the complete opposite for both.
Oh and I tried all my adjustments through event_egs. If I'm not meant to do it through there then how do I get my actor to obtain the ID of the projectile that it spawned?