Modding maps with fences

4 months 1 week ago #7 by Shay
Replied by Shay on topic Modding maps with fences
Can't wait

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

4 months 1 week ago - 4 months 1 week ago #8 by Nikita
Replied by Nikita on topic Modding maps with fences

Stern wrote:

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...
:666:


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.
The following user(s) said Thank You: snowman

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

4 months 1 week ago #9 by snowman
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!

"Walk through all fear no matter what."
The following user(s) said Thank You: Nikita

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

4 months 1 week ago - 4 months 1 week ago #10 by Nikita
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...

Warning: Spoiler!


Explosive fences mentioned by Stern are instant kill, so perhaps more dedicated against vehicles.
Attachments:
The following user(s) said Thank You: snowman

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

4 months 1 week ago - 4 months 1 week ago #11 by Stern
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:
_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:
_ItemInRange

I have to test it maybe its possible to check if wirecutter is in range.

Or
_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:
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:
...
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....:confused:
Label fenceactorstate:
PrintfNumber("Fence51 ActorState: ", _Actor_GetState(fence51));
Delay(5000);
goto fenceactorstate;

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

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

4 months 1 week ago - 4 months 1 week ago #12 by Nikita
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 ?
:undecided:
The following user(s) said Thank You: snowman

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

Powered by Kunena Forum

Next birthdays

  • Stonewall birthday is in 2 days (56)
  • VCG_freddy birthday is in 3 days (29)
  • Artur birthday is in 4 days (28)
  • Goblin birthday is in 9 days (54)
 
 
 

We use cookies on our website. Some of them are essential for the operation of the site, while others help us to improve this site and the user experience (tracking cookies). You can decide for yourself whether you want to allow cookies or not. Please note that if you reject them, you may not be able to use all the functionalities of the site.