GetPlayerInput not work in Multiplayer

Archive of the old editing forum
Forum rules
Before asking on how to use a ZDoom feature, read the ZDoom wiki first. This forum is archived - please use this set of forums to ask new questions.
Locked
rico345
Posts: 193
Joined: Mon Sep 08, 2008 5:24 am
Location: Gimhae City, Republic Of Korea

GetPlayerInput not work in Multiplayer

Post by rico345 »

Title said, "GetPlayerInput" is not working on multiplayer.
I must be need working on multiplayer.
Is there a way to solve this problem?
User avatar
XutaWoo
Posts: 4005
Joined: Sat Dec 30, 2006 4:25 pm
Location: beautiful hills of those who are friends
Contact:

Re: GetPlayerInput not work in Multiplayer

Post by XutaWoo »

Yes

Put -1 instead of zero.
rico345
Posts: 193
Joined: Mon Sep 08, 2008 5:24 am
Location: Gimhae City, Republic Of Korea

Re: GetPlayerInput not work in Multiplayer

Post by rico345 »

Xuta
I'm already using -1 but not working
User avatar
Apothem
Posts: 2070
Joined: Sat Nov 29, 2003 7:13 pm
Location: Performing open heart surgery on an ACS compiler.

Re: GetPlayerInput not work in Multiplayer

Post by Apothem »

It helps if you post the script. We can't really help you if you dont show us what the problem is.
rico345
Posts: 193
Joined: Mon Sep 08, 2008 5:24 am
Location: Gimhae City, Republic Of Korea

Re: GetPlayerInput not work in Multiplayer

Post by rico345 »

Okay,

ACS

Code: Select all

script 1 ENTER
{
	if(GetPlayerInput(-1, INPUT_BUTTONS) & BT_CROUCH) GiveInventory("IsCrouching", 1);

	delay(1);
	Restart;
}
Decorate

Code: Select all

actor IsCrouching : Inventory
{
	Inventory.amount 0
	Inventory.maxamount 1
}
CO2
Posts: 42
Joined: Tue Jul 29, 2008 9:24 am

Re: GetPlayerInput not work in Multiplayer

Post by CO2 »

So basically, the first time the player crouches, they are given an inventory item.
User avatar
XutaWoo
Posts: 4005
Joined: Sat Dec 30, 2006 4:25 pm
Location: beautiful hills of those who are friends
Contact:

Re: GetPlayerInput not work in Multiplayer

Post by XutaWoo »

Well

1. The item is never taken away.

2. There's no similar RESPAWN script so that when the players die it no longer works.
User avatar
Matt
Posts: 9696
Joined: Sun Jan 04, 2004 5:37 pm
Preferred Pronouns: They/Them
Operating System Version (Optional): Debian Bullseye
Location: Gotham City SAR, Wyld-Lands of the Lotus People, Dominionist PetroConfederacy of Saudi Canadia
Contact:

Re: GetPlayerInput not work in Multiplayer

Post by Matt »

What XutaWoo said, though I'd take the item away on a DEATH script instead.

Either way, though, the easiest thing would probably be to just add an "else" to the above code that takes the item away.
rico345
Posts: 193
Joined: Mon Sep 08, 2008 5:24 am
Location: Gimhae City, Republic Of Korea

Re: GetPlayerInput not work in Multiplayer

Post by rico345 »

Thanks Xutawoo nd Vaecrius.
I'll try to add Respawn script.
User avatar
Macil
Posts: 2529
Joined: Mon Mar 22, 2004 7:00 pm
Preferred Pronouns: He/Him
Location: California, USA. Previously known as "Agent ME".
Contact:

Re: GetPlayerInput not work in Multiplayer

Post by Macil »

XutaWoo wrote:2. There's no similar RESPAWN script so that when the players die it no longer works.
ENTER scripts don't stop when the player dies. No RESPAWN script is needed for this.
Locked

Return to “Editing (Archive)”