SimulatePlayerInput() for ACS

Moderator: GZDoom Developers

Post Reply
User avatar
XutaWoo
Posts: 4005
Joined: Sat Dec 30, 2006 4:25 pm
Location: beautiful hills of those who are friends
Contact:

SimulatePlayerInput() for ACS

Post by XutaWoo »

Code: Select all

SimulatePlayerInput(int player, int input, int value)
Player and input are the same as GetPlayerInput, value determines the direction (so INPUT_FORWARDMOVE with 1 is forward, -1 is backward). This command lasts for a single tic.

For use with GetPlayerInput for minigames and the such.
Gez
 
 
Posts: 17946
Joined: Fri Jul 06, 2007 3:22 pm

Re: SimulatePlayerInput() for ACS

Post by Gez »

Would it just fool GetPlayerInput or would it fool the whole game (and thus control the character)? In the former, I'm not sure what's the point, in the latter I'm not sure it'll be accepted.
User avatar
XutaWoo
Posts: 4005
Joined: Sat Dec 30, 2006 4:25 pm
Location: beautiful hills of those who are friends
Contact:

Re: SimulatePlayerInput() for ACS

Post by XutaWoo »

The latter. I'm making something with multiple classes with different speeds PLUS a speed-up item 2D so I need this for the sidemovement with animation. I guess I could steal the code from Pogostick but I want to keep away from new keybinds.

Honestly, why not though? It could also be used for third-person cutscenes.
User avatar
Necromage
Posts: 484
Joined: Thu Feb 10, 2005 3:13 pm
Location: NJ
Contact:

Re: SimulatePlayerInput() for ACS

Post by Necromage »

Why not? Because it is way to easy to abuse. In three seconds I could throw together a pwad that continually moves all the players to the left.
User avatar
XutaWoo
Posts: 4005
Joined: Sat Dec 30, 2006 4:25 pm
Location: beautiful hills of those who are friends
Contact:

Re: SimulatePlayerInput() for ACS

Post by XutaWoo »

And that's when the players close ZDoom or beat Doom 2 by always moving left. Actually, aside from the need to do some tricky turn-arounds on catwalks to flip switchs, that sounds like an good "new" way for beating wads.
User avatar
Cutmanmike
Posts: 11354
Joined: Mon Oct 06, 2003 3:41 pm
Operating System Version (Optional): Windows 10
Location: United Kingdom
Contact:

Re: SimulatePlayerInput() for ACS

Post by Cutmanmike »

Necromage wrote:Why not? Because it is way to easy to abuse. In three seconds I could throw together a pwad that unbinds all the controls and exits.
Better example :P

Although I'm all for it
User avatar
HotWax
Posts: 10002
Joined: Fri Jul 18, 2003 6:18 pm
Location: Idaho Falls, ID

Re: SimulatePlayerInput() for ACS

Post by HotWax »

Necromage wrote:Why not? Because it is way to easy to abuse. In three seconds I could throw together a pwad that continually moves all the players to the left.
In less time than that I could throw together a WAD that flashes your screen between full black and red, giving you seizures and making the game unplayable. And I wouldn't need any new features to do it. :roll:
Cutmanmike (Really) wrote:In three seconds I could throw together a pwad that unbinds all the controls and exits.
Not with this command, you couldn't. This is to simulate the same types of movement available to the [wiki]GetPlayerInput[/wiki] command. That does not mean you can use it to simulate any arbitrary keypress. In fact, you would only be able to affect the player's movement in-game; the console would be 100% off-limits.
User avatar
Cutmanmike
Posts: 11354
Joined: Mon Oct 06, 2003 3:41 pm
Operating System Version (Optional): Windows 10
Location: United Kingdom
Contact:

Re: SimulatePlayerInput() for ACS

Post by Cutmanmike »

Oh I see. That makes things better then. I hardly see how moving the player to the left constantly is abuse though :)

Edit: Actually Hotwax got the point across better than me. O-)
User avatar
Isle
Posts: 687
Joined: Fri Nov 21, 2003 1:30 am
Location: Arizona, USA

Re: SimulatePlayerInput() for ACS

Post by Isle »

Cutmanmike (Really) wrote:In three seconds I could throw together a pwad that unbinds all the controls and exits.
i've done that...
User avatar
MG_Man
Posts: 1401
Joined: Sat Jul 28, 2007 1:24 pm
Contact:

Re: SimulatePlayerInput() for ACS

Post by MG_Man »

You can already do some messed up stuff in ACS as it is, there are already ways to 'constantly move the player left.' However, this is a much more controlled and much, much less complicated version of doing so.

So basically, there's nothing so dangerous in doing this as what's already there.
Post Reply

Return to “Closed Feature Suggestions [GZDoom]”