Modding maps with fences
- ShayoX
-
- Offline
- Modding the hell out of H&D2 ;)
Less
More
5 years 1 month ago #7
by ShayoX
Replied by ShayoX on topic Modding maps with fences
Can't wait
Please Log in or Create an account to join the conversation.
- Nikita
-
Topic Author
- Offline
- "Never interrupt an enemy who's making a mistake." Napoléon Bonaparte
Less
More
- Posts: 3755
- Thank you received: 3612
5 years 1 month ago - 5 years 1 month ago #8
by Nikita
Is there a way to test the _PlayerInRange equipment ?
If yes, is there a way to "electrify" the fence only if _PlayerInRange carries wirecutters ?
The idea is to make the fences more dangerous only for soldiers who carry the dedicated equipment to deal with them...
Also, about damages, the idea is to set them so as a healthy character for engineer carying wirecutters would be able to endure damages during the time he needs to cut the fence, then a medic could take care of him, but a standard character would die before finishing the job.
Also, about fences generating explosions, it's also a good idea because fences can be detroyed with vehicles, so explosions could be more effective against them.
Replied by Nikita on topic Modding maps with fences
Stern wrote:
Code:frame fence51; FRM_FIndFrame(fence51,"fence51"); Whenever CloseToFence (_PlayerInRange(2)) //check if player is close { MakeExplosion(fence51, 5760000, 100000); //make explosion SetWhenever(CloseToFence,1); //reset to be used again }
Is there a way to test the _PlayerInRange equipment ?
If yes, is there a way to "electrify" the fence only if _PlayerInRange carries wirecutters ?
The idea is to make the fences more dangerous only for soldiers who carry the dedicated equipment to deal with them...
Also, about damages, the idea is to set them so as a healthy character for engineer carying wirecutters would be able to endure damages during the time he needs to cut the fence, then a medic could take care of him, but a standard character would die before finishing the job.
Also, about fences generating explosions, it's also a good idea because fences can be detroyed with vehicles, so explosions could be more effective against them.
Last edit: 5 years 1 month ago by Nikita.
The following user(s) said Thank You: snowman
Please Log in or Create an account to join the conversation.
- snowman
-
- Offline
- Your most dear friend.
5 years 1 month ago #9
by snowman
"Straight and narrow is the path."
Replied by snowman on topic Modding maps with fences
Nik, you mean just like going over barbed wire, you get hurt more the longer you stay on it? This is a good idea!
"Straight and narrow is the path."
The following user(s) said Thank You: Nikita
Please Log in or Create an account to join the conversation.
- Nikita
-
Topic Author
- Offline
- "Never interrupt an enemy who's making a mistake." Napoléon Bonaparte
Less
More
- Posts: 3755
- Thank you received: 3612
5 years 1 month ago - 5 years 1 month ago #10
by Nikita
Yes, that's what i mean, also similar as progressive damages by campfires, not an instant kill, so leaving enough time to a healthy "blood and guts" engineer to finish the job before dying and then get treated immediately after by the medic...
Explosive fences mentioned by Stern are instant kill, so perhaps more dedicated against vehicles.
Replied by Nikita on topic Modding maps with fences
snowman wrote: Nik, you mean just like going over barbed wire, you get hurt more the longer you stay on it? This is a good idea!
Yes, that's what i mean, also similar as progressive damages by campfires, not an instant kill, so leaving enough time to a healthy "blood and guts" engineer to finish the job before dying and then get treated immediately after by the medic...
Explosive fences mentioned by Stern are instant kill, so perhaps more dedicated against vehicles.
Last edit: 5 years 1 month ago by Nikita.
The following user(s) said Thank You: snowman
Please Log in or Create an account to join the conversation.
- Stern
-
- Offline
Less
More
- Posts: 746
- Thank you received: 569
5 years 1 month ago - 5 years 1 month ago #11
by Stern
Now your great ideas go beyond possibilitys of this game....
To check if item exists in player inventory:
But it does not allow to pinpoint the player who has it, it just returns true if atleast one has it.
I checked script commands and there is a:
I have to test it maybe its possible to check if wirecutter is in range.
Or
I dont know if its possible to place wirecutter into mission as a object (with name in file), then it might be possible to detect it with it.
**********************
_ItemInRange can only detect item if its outside of player inventory.
Made script this way:
Added Item 62 (grenade), the fence exploded only when i dropped nade on the ground.
**************
It is possible to detect if the fence is cut:
Its useful to set alarm...
(Make a patrol enemy to detect it and then run to set alarm)
When its written like this it doesnt work....
The one who hesitates is lost !
Replied by Stern on topic Modding maps with fences
Nikita wrote:
Is there a way to test the _PlayerInRange equipment ?
Now your great ideas go beyond possibilitys of this game....
To check if item exists in player inventory:
Code:
_MP_IsItemInTeamInventory
But it does not allow to pinpoint the player who has it, it just returns true if atleast one has it.
I checked script commands and there is a:
Code:
_ItemInRange
I have to test it maybe its possible to check if wirecutter is in range.
Or
Code:
_FrameInRange
I dont know if its possible to place wirecutter into mission as a object (with name in file), then it might be possible to detect it with it.
**********************
_ItemInRange can only detect item if its outside of player inventory.
Made script this way:
Code:
frame fence51; FRM_FIndFrame(fence51,"fence51");
Whenever CloseToFence ((_PlayerInRange(2)) and (_ItemInRange(62,4))) //item 62
{
MakeExplosion(fence51, 5760000, 100000);
SetWhenever(CloseToFence,1);
}
Added Item 62 (grenade), the fence exploded only when i dropped nade on the ground.
**************
It is possible to detect if the fence is cut:
Code:
...
Label fenceactorstate:
Astate=(_Actor_GetState(fence51));
PrintfNumber("Fence51 ActorState: ", Astate);
Delay(5000);
goto fenceactorstate;
Its useful to set alarm...
(Make a patrol enemy to detect it and then run to set alarm)
When its written like this it doesnt work....
Code:
Label fenceactorstate:
PrintfNumber("Fence51 ActorState: ", _Actor_GetState(fence51));
Delay(5000);
goto fenceactorstate;
The one who hesitates is lost !
Last edit: 5 years 1 month ago by Stern.
The following user(s) said Thank You: snowman, Nikita
Please Log in or Create an account to join the conversation.
- Nikita
-
Topic Author
- Offline
- "Never interrupt an enemy who's making a mistake." Napoléon Bonaparte
Less
More
- Posts: 3755
- Thank you received: 3612
5 years 1 month ago - 5 years 1 month ago #12
by Nikita
Ok, i see it (at least i think so). So, let's consider it with a bit different angle by using this function _MP_IsItemInTeamInventory.
Case A :
If no player is carrying wirecutters, then _MP_IsItemInTeamInventory ==> False and then fences are reputed unbreakable (let's not consider destruction by vehicle for the moment for this hypothesis) and therefore they don't have any special need to be "electryfied".
Case B :
If any player is carrying wirecutters at any moment (whatever in his original inventory or picked in any random crate or enemy body during the mission), then _MP_IsItemInTeamInventory ==> True and then all the fences must turn "electryfied". Whatever the player who will be "voluntered" to use the wirecutters to cut them, and this for any fence on the map, the glorious hero will have to deal with high voltage stuff.
Of course, the above doesn't work if _MP_IsItemInTeamInventory is checked once for all at the beginning of the map, as perhaps to verify if a specific item that is needed for the mission is well present in the inventory before launching the map. What does it give ?
Replied by Nikita on topic Modding maps with fences
Ok, i see it (at least i think so). So, let's consider it with a bit different angle by using this function _MP_IsItemInTeamInventory.
Case A :
If no player is carrying wirecutters, then _MP_IsItemInTeamInventory ==> False and then fences are reputed unbreakable (let's not consider destruction by vehicle for the moment for this hypothesis) and therefore they don't have any special need to be "electryfied".
Case B :
If any player is carrying wirecutters at any moment (whatever in his original inventory or picked in any random crate or enemy body during the mission), then _MP_IsItemInTeamInventory ==> True and then all the fences must turn "electryfied". Whatever the player who will be "voluntered" to use the wirecutters to cut them, and this for any fence on the map, the glorious hero will have to deal with high voltage stuff.
Of course, the above doesn't work if _MP_IsItemInTeamInventory is checked once for all at the beginning of the map, as perhaps to verify if a specific item that is needed for the mission is well present in the inventory before launching the map. What does it give ?
Last edit: 5 years 1 month ago by Nikita.
The following user(s) said Thank You: snowman
Please Log in or Create an account to join the conversation.
Birthdays
- N ø b ø d y
- NIB in 2 days
- xXTravmon in 5 days
- Tecnom in 9 days

