Li1 Prison Break

6 years 6 months ago - 6 years 6 months ago #1 by Stern
Libya1( Prison Break) was created by Stern
Have anyone try to develop a script to detect killed enemy by other enemy?
Its unrealistic and even funny when enemy is walking near body and not getting alerted by it.

In this case the scripts are too primitive to make this simple, no "record" type or "array" exists (to compare against).
I guess all enemy actors have to be framed in all other enemy scripts to detect if its in range.
enemy1 must have enemy2 and enemy3
enemy2 must have enemy1 and enemy3
enemy3 must have enemy1 and enemy2
and so on...

I made one test script, in some case it works, but it seems _FrameInRange dont accept killed enemy, even if the ActorState is turned back to "1"...

This script language really hates modders :devil:

The one who hesitates is lost !
The following user(s) said Thank You: snowman

Please Log in or Create an account to join the conversation.

6 years 6 months ago #2 by NL
Replied by NL on topic Detect dead enemy (MP)
It is possible in SP yes?
If you make it possible in coop, also make possible we can move and hide the bodies ;)

Trust is hard to gain but easy to lose.

Please Log in or Create an account to join the conversation.

6 years 6 months ago #3 by Stern
Replied by Stern on topic Detect dead enemy (MP)
I dont remember how it worked in SP, but there are special script command:
SetAlarmType(512, 0);
Its alarm type 512, here its "0", it means its turned off for this enemy.
This one and some others dont work for clients in MP and they should be turned off, even if its coop mission, because if coop mission is started from game menu, it might make mission act different.
Strange thing is that even if "hear steps" is turned off, enemy still can hear steps, but dont get alerted (not for clients).
There are some ways fake this for clients...to make harder to kill enemy by sneaking from behind.

Ability to pick up and carry corpse cannot be turned on or off from scripts, this function seems to be off for MP from game functionality, even this part of menu is disabled...:undecided:

You can fool around in sp by this corpse carrying ally, by commanding it to enter vehicle, somehow the corpse will get bugged and remain attached to ally and look very funny walking around with it.

The one who hesitates is lost !

Please Log in or Create an account to join the conversation.

6 years 6 months ago - 6 years 6 months ago #4 by Polanski
Replied by Polanski on topic Detect dead enemy (MP)
I tried to activate the alarms by hearing explosion and steps and I did not work either. maybe with HUMAN_SETAIMODE_Aggressive soldiers be easier to alert when they see bodies.

Please Log in or Create an account to join the conversation.

6 years 6 months ago - 6 years 6 months ago #5 by Stern
Replied by Stern on topic Detect dead enemy (MP)
Aggressive and other modes are for the attack state. I dont believe that there is connection to seeing corpses.

There is a way to make corpses disappear, this is maybe useful in maps where there is a large number of enemy and to make the mission run smoother, enemy that is out of reach by player, could disappear (snipers on the hill or on the roofs...)
On the ground, player needs enemy for items.
But with today's powerful computers, dont have to bother anyway...

The one who hesitates is lost !

Please Log in or Create an account to join the conversation.

6 years 6 months ago #6 by Stern
Replied by Stern on topic Detect dead enemy (MP)

Stern wrote: ...no "record" type or "array" exists...


I found that "enum" exists in script commands.
Enum is a type that can hold pre-defined constants...or even change the constants on the run,
but I have never seen it used in scripts...have to search through all original missions scripts...

The one who hesitates is lost !

Please Log in or Create an account to join the conversation.

  • Lukasz birthday is in 9 days (41)
Powered by Kunena Forum