Page 1 of 1

Disguise?

Posted: Tue Apr 23, 2013 12:21 am
by Livermore
Hi, I need to know how to make disguise system for example grab enemy uniform without being seen and the enemies do not see you if they see you are attacking a enemy or a body the enemy will attack you
thanks
Sorry for my bad english

RE: Disguise?

Posted: Tue Apr 23, 2013 12:37 am
by Ænima
Make the "uniform" pickup give you NOTARGET. You'll probably have to set this via ACS.

Code: Select all

SetPlayerProperty(0,1, PROP_NOTARGET);

RE: Disguise?

Posted: Tue Apr 23, 2013 1:39 am
by Ijon Tichy
DECORATE can SetPlayerProperty, just do something like

HERP A 0 SetPlayerProperty(0, 1, PROP_NOTARGET)

RE: Disguise?

Posted: Tue Apr 23, 2013 4:02 pm
by Livermore
but if you kill another enemies and the others see it, enemies dont alert
but if you kill another enemies and the others see it, enemies dont alert

RE: Disguise?

Posted: Tue Apr 23, 2013 4:41 pm
by Ænima
Make it so that killing an enemy takes away NOTARGET. Make the monster give the player an item in its Death state, and that item is AUTOACTIVATE and will call SetPlayerProperty.

RE: Disguise?

Posted: Tue Apr 23, 2013 6:32 pm
by Livermore
Ijon Tichy wrote: DECORATE can SetPlayerProperty, just do something like

HERP A 0 SetPlayerProperty(0, 1, PROP_NOTARGET)
dont works
enemies still seeing you

ACTOR GeneralUniform : powerupgiver 10101
{
Inventory.PickupMessage "General Uniform"
Inventory.MaxAmount 1
+Inventory.AutoActivate
States
{
Spawn:
UNIF A 1
UNIF A -1
Stop
Use:
TNT1 A 1 SetPlayerProperty(0, 1, PROP_NOTARGET)
TNT1 A 1
Stop
}
}

RE: Disguise?

Posted: Tue Apr 23, 2013 6:44 pm
by Ijon Tichy
>powerupgiver

it's CustomInventory

RE: Disguise?

Posted: Wed Apr 24, 2013 1:23 am
by Livermore
Ænima wrote: ...Make the monster give the player an item in its Death state...
how

RE: Disguise?

Posted: Wed Apr 24, 2013 2:40 am
by Ænima
Livermore wrote:
Ænima wrote: ...Make the monster give the player an item in its Death state...
how
http://zdoom.org/wiki/A_GiveToTarget

RE: Disguise?

Posted: Sat Apr 27, 2013 5:05 pm
by Lollipop
also, try something like this in the monsters attack state:
A_jumpifintargetinventory("uniformsomeitem", 1, "idle")

that will make the enemies not see you, then you can also make higher ranking enemies see you if uniform is too low ranking.

I'm not sure on how you want to activate this, but this is my suggestion on when the enemies will see you:

acs_execute(X) //X being the number of choice

acs script

A_takeinventory("uniformsomeitem", 1);
delay(how much time is tics (tic = 1/35 of second))
a_giveinventory("uniformsomeitem", 1);

I recommend you put the script activator in the monsters painstate for the weapons damage type, and then put the script in the players pain state too, then it will Work when he damages a monster and when he gets damaged himself.

I can provide help with above if nessesary

that should Work for a singleplayer game, but it needs changes if its multiplayer though

hope this helps you