|
Remy Lebeau
|
 |
« on: December 22, 2012, 11:32:32 PM » |
|
So I'm trying to create a skill for a race that is a lot like the cloak and dagger (tf2 spy). Basically, if someone shoots you, you appear to die, but you can still move around and then come alive again.
The only way I can think of doing it in CSS is to let the player actually die, then put them into freeview mode in spectator, and then after some time respawn them where they are looking.
Is there a way to a) put someone into freeview spectator mode, and then b) respawn them where they are looking?
I think I can probably work b) out, but need some help with a)...
|
|
|
|
|
Logged
|
|
|
|
|
Necavi
|
 |
« Reply #1 on: December 22, 2012, 11:50:56 PM » |
|
Well, respawn them with no weapons, then let them roam around in noclip/god (for a limited time - watch for potential round ends) and then restore weapons/remove god/noclip upon end of skill or hitting a button.
Or better would be to prehook the fatal damage, set them as god (there's a god mode which allows bullets to phase through you, I believe) and then let them run around invisible for a little bit.
Don't forget to fire off a player_death event, for the notification and all that.
|
|
|
|
« Last Edit: December 22, 2012, 11:52:48 PM by Necavi »
|
Logged
|
|
|
|
|
Ownz
|
 |
« Reply #2 on: December 23, 2012, 07:02:24 PM » |
|
add a death model that is convincing...
|
|
|
|
|
Logged
|
 DarkEnergy
|
|
|
|
Necavi
|
 |
« Reply #3 on: December 23, 2012, 07:03:40 PM » |
|
Indeed, something that has never come up for me so I don't know how to do that and omitted it.
|
|
|
|
|
Logged
|
|
|
|
|
Ownz
|
 |
« Reply #4 on: December 23, 2012, 07:05:15 PM » |
|
the fake death event may or may not interfere with the existing death hooks such as give xp etc...
overall its very complicated
|
|
|
|
|
Logged
|
 DarkEnergy
|
|
|
|
Necavi
|
 |
« Reply #5 on: December 23, 2012, 07:06:22 PM » |
|
Depends on whether you want to do things well or easily. Usually I do things well, which would involve quite a bit of complexity in this case, but you can be damn sure that I'd do it that way.
|
|
|
|
|
Logged
|
|
|
|
|
Remy Lebeau
|
 |
« Reply #6 on: December 23, 2012, 10:24:56 PM » |
|
Thanks for the replies, I'll keep trying out ideas to see what I can manage. For now I did a simpler version that disappears and drops a smoke when they get shot.
|
|
|
|
|
Logged
|
|
|
|
|