Box Throwing Fun!
-
- Illuminati
- Posts: 2284
- Joined: Thu Mar 08, 2012 3:21 am
Box Throwing Fun!
How feasible would it be to increase the throwing distance and speed of Microfibral Muscle Aug further? At max level I'd like it to give the player the ability to throw boxes across the room and do minor damage to NPCs a la Invisible War and Human Revolution.
Is this doable considering the old physics engine, would it choke?
Is this doable considering the old physics engine, would it choke?
Re: Box Throwing Fun!
Increasing the speed of thrown objects is really easy. In fact, my mod either already does it or will in the next version (either way, I've implemented it).
Having them do damage to NPCs is a little harder. That's probably in the ScriptedPawn Bump() function, but I'm not sure. Doesn't Shifter do something like this?
Having them do damage to NPCs is a little harder. That's probably in the ScriptedPawn Bump() function, but I'm not sure. Doesn't Shifter do something like this?
Re: Box Throwing Fun!
Three problems:
One: what if they don't want to throw something, but drop it instead? "I'd like to pick up this large crate and put it down over here rather than give myself a hernia trying to fling it away", or "I'd like to be able to pick up and then drop this small crate without having to remember to turn off uber-arms so I don't accidentally hurl it across the room"
Two: how do you indicate that the thrown item should now cause damage? If a pawn is hit in the face with a speeding crate, nothing happens. If they're hit down on the head with one, they take damage (the game assumes "items falling should hurt", but does not apply this to "velocity as a whole")
Three: you're still stuck with DX's crappy physics and collision cylinders, so you'll be hurling a crate that flies through the air while remaining nicely vertical, bounces off someone's face while remaining nicely vertical, and then crashes to the floor, again remaining nicely vertical.
Aside from those caveats, it's actually feasible (I've done it), it's simply not very elegant, nor very pretty.
One: what if they don't want to throw something, but drop it instead? "I'd like to pick up this large crate and put it down over here rather than give myself a hernia trying to fling it away", or "I'd like to be able to pick up and then drop this small crate without having to remember to turn off uber-arms so I don't accidentally hurl it across the room"
Two: how do you indicate that the thrown item should now cause damage? If a pawn is hit in the face with a speeding crate, nothing happens. If they're hit down on the head with one, they take damage (the game assumes "items falling should hurt", but does not apply this to "velocity as a whole")
Three: you're still stuck with DX's crappy physics and collision cylinders, so you'll be hurling a crate that flies through the air while remaining nicely vertical, bounces off someone's face while remaining nicely vertical, and then crashes to the floor, again remaining nicely vertical.
Aside from those caveats, it's actually feasible (I've done it), it's simply not very elegant, nor very pretty.
Re: Box Throwing Fun!
This is a problem in Deus Ex in general, unfortunately. However, you can always just look down toward the ground first, and if you're placing it on top of another decoration, the game at least attempts to try that before attempting a throw.DDL wrote:One: what if they don't want to throw something, but drop it instead? "I'd like to pick up this large crate and put it down over here rather than give myself a hernia trying to fling it away", or "I'd like to be able to pick up and then drop this small crate without having to remember to turn off uber-arms so I don't accidentally hurl it across the room"
I feel like you're answering your own question here. You'd just put the relevant code into Bump() instead of SupportActor(), and have it work off of total velocity instead.Two: how do you indicate that the thrown item should now cause damage? If a pawn is hit in the face with a speeding crate, nothing happens. If they're hit down on the head with one, they take damage (the game assumes "items falling should hurt", but does not apply this to "velocity as a whole")
I've done it, to the extent that having maximum muscle aug allows you to throw small crates relatively far, and it's not that ugly. At least, it's not significantly more ugly than Deus Ex's physics are to begin with.Three: you're still stuck with DX's crappy physics and collision cylinders, so you'll be hurling a crate that flies through the air while remaining nicely vertical, bounces off someone's face while remaining nicely vertical, and then crashes to the floor, again remaining nicely vertical.
-
- Illuminati
- Posts: 2284
- Joined: Thu Mar 08, 2012 3:21 am
Re: Box Throwing Fun!
Thanks guys.
Could have left mouse click=Drop, Right click=Throw. And have aug deactivate call on the drop code also.
What about simply deactivating the aug whilst a box is in your hands? Would that still throw it across the room without additional code, it would right?DDL wrote: One: what if they don't want to throw something, but drop it instead? "I'd like to pick up this large crate and put it down over here rather than give myself a hernia trying to fling it away", or "I'd like to be able to pick up and then drop this small crate without having to remember to turn off uber-arms so I don't accidentally hurl it across the room"
Could have left mouse click=Drop, Right click=Throw. And have aug deactivate call on the drop code also.
Re: Box Throwing Fun!
Of course, this means you couldn't drop a weapon, although I'm not sure that's relevant.Cybernetic pig wrote:Could have left mouse click=Drop, Right click=Throw. And have aug deactivate call on the drop code also.
-
- Illuminati
- Posts: 2284
- Joined: Thu Mar 08, 2012 3:21 am
Re: Box Throwing Fun!
It does? I meant the left click drop code only applies to when a box is in your hands. Contextual. Or just mouse 3 could be drop, same as drop weapon. Would make more sense.G-Flex wrote:Of course, this means you couldn't drop a weapon, although I'm not sure that's relevant.Cybernetic pig wrote:Could have left mouse click=Drop, Right click=Throw. And have aug deactivate call on the drop code also.
Re: Box Throwing Fun!
Yeah, I added a 'throw' binding, so "fire button, while holding shit" = throw, and "use button, while holding shit" = drop, and that seems to work fine.
I seem to remember I had enormous trouble getting the game to handle bump() correctly, though that could be because I was either even crapper at coding back when I was trying, or because I'm not modifying deusex.u, but hey.
Edit: ah, I've just looked it up. My main problem was getting the game to successfully differentiate between dropping and throwing once the objects were in motion. In terms of "damage done" via bump(), accidentally hitting someone with a crate you were just dropping, vs deliberately flinging a beer bottle into someone's face or something...ended up about equivalent, since it's a function of mass and velocity.
Whereas I'd like the game to be able to tell the difference in intent between "whups, was that your foot" and "DIE WITH A FACE FULL O' GLASS, COCKBAG"
I seem to remember I had enormous trouble getting the game to handle bump() correctly, though that could be because I was either even crapper at coding back when I was trying, or because I'm not modifying deusex.u, but hey.
Edit: ah, I've just looked it up. My main problem was getting the game to successfully differentiate between dropping and throwing once the objects were in motion. In terms of "damage done" via bump(), accidentally hitting someone with a crate you were just dropping, vs deliberately flinging a beer bottle into someone's face or something...ended up about equivalent, since it's a function of mass and velocity.
Whereas I'd like the game to be able to tell the difference in intent between "whups, was that your foot" and "DIE WITH A FACE FULL O' GLASS, COCKBAG"
-
- Illuminati
- Posts: 2284
- Joined: Thu Mar 08, 2012 3:21 am
Re: Box Throwing Fun!
EDIT: Never mind, got it.
Last edited by Cybernetic pig on Sat May 04, 2013 11:25 pm, edited 2 times in total.
-
- Illuminati
- Posts: 2284
- Joined: Thu Mar 08, 2012 3:21 am
Re: Box Throwing Fun!
Just saved, reloaded ued & then it played nice. Rusty ol' software
-
- Illuminati
- Posts: 2284
- Joined: Thu Mar 08, 2012 3:21 am
Re: Box Throwing Fun!
More:
1. I have a room that is initially completely dark but the player can turn on the lights, once the lights are on all actors do not get light cast on them including JC. How do you make triggerlights emitted light dynamic?
2. How do you trigger a SFX source (non-looping) to play only once? I trigger it and it just loops regardless.
3. Is there any way to take any actor property value and modify it with triggers & events. Or even toggle True/False using T's & E's. I'm talking almost ANYTHING you find in the properties of an actor, texture, whatever.
Example: Player turns on light, specific texture becomes "unlit". "Unlit" found in texture properties was set to true in-game via Triggers.
EDIT: Hmm, Flag Trigger might be it, but restricted to boolean only.
1. I have a room that is initially completely dark but the player can turn on the lights, once the lights are on all actors do not get light cast on them including JC. How do you make triggerlights emitted light dynamic?
2. How do you trigger a SFX source (non-looping) to play only once? I trigger it and it just loops regardless.
3. Is there any way to take any actor property value and modify it with triggers & events. Or even toggle True/False using T's & E's. I'm talking almost ANYTHING you find in the properties of an actor, texture, whatever.
Example: Player turns on light, specific texture becomes "unlit". "Unlit" found in texture properties was set to true in-game via Triggers.
EDIT: Hmm, Flag Trigger might be it, but restricted to boolean only.
-
- Illuminati
- Posts: 2284
- Joined: Thu Mar 08, 2012 3:21 am
Re: Box Throwing Fun!
Ok got that problem again: Got a bunch of stuff I want to delete but they refuse to delete and duplicate if you try and even drag them!
Re: Box Throwing Fun!
What kind of "SFX source"? I know that SpecialEvents can be set to play a sound, so that should work.Cybernetic pig wrote:2. How do you trigger a SFX source (non-looping) to play only once? I trigger it and it just loops regardless.
Flag triggers have nothing to do with that; those are for player flags only, as in the ones seen in the 'legend' menu.3. Is there any way to take any actor property value and modify it with triggers & events. Or even toggle True/False using T's & E's. I'm talking almost ANYTHING you find in the properties of an actor, texture, whatever.
Not really, since the triggering actor's code would need to be aware of all properties it could possibly modify in all classes it could possibly modify.
Example: Player turns on light, specific texture becomes "unlit". "Unlit" found in texture properties was set to true in-game via Triggers.
EDIT: Hmm, Flag Trigger might be it, but restricted to boolean only.
-
- Illuminati
- Posts: 2284
- Joined: Thu Mar 08, 2012 3:21 am
Re: Box Throwing Fun!
Here you go. It's not finished yet but almost there: https://www.youtube.com/watch?v=wKzFBRCDGbY