Hi I need help with some coding,
My Idea is that a Vehicle moves in to a Top_layer in this case mud, it will have a chance of either damage its engine or excuses pipe.
Track vehicle like tanks and halftrack would have a less chance of getting stuck then a wheeled vehicle such as jeep or kubelwagen.
So a wheeled vehicle would have a 30% chance of getting damage to its excuses pipe
Halftracks and light and medium tanks would have a 20% of getting a overloaded engine
Heavy tanks would get a 35% chance of engine break down in the mud.
1. So in the code I need the following , to Identifier top_layer texture and make it react to vehicles entering such areas on the map where the above would happen.
2. I need a % calculator to calculate the % chance of vehicles and tanks getting stuck in the mud and it would run randomly between ever 2-5 min to contest Vehicle, driving around in the mud.
So this is the coding I am trying to made.
I need your help and Ideas to how to make such a code..
So right now I have chosen the Kubelwagen as a test vehicles.
-----------------------------------------------------------------------------------------------
function OnInitID()
-- [[ Markers ]]
-- [[ Squad Groups ]]
--When entering mud layer top layer Vehicle will get a random chance off damage engine or excurse
_top_layer=true
--Germans Forces
= If
_kubelwagen_type_82_mp ={ability = kubelwagen_type82_mp, isvehicle=true}
= Then
import random
if random.randint(0,100) < 36:
do_stuff(_disable_vehicles=true)
-- [[ Entity Groups ]]
end
Please help me with some ideas off what I am doing wrong.
best regards Von_Smedman
Lua Scripting for Vehicles getting Stuck in mud
27 Jun 2016, 17:08 PM
#1

Posts: 108
PAGES (1)

0 user is browsing this thread:
SHOUT IT OUT!



aerafield: Cloaked instapin MGs at 0cp. I wanna see no more crying about the Dingo while that shit is in the game 
Yesterday, 20:38 PM

Yesterday, 20:38 PM
Willy Pete: And only on annihilation, and I have to let the AI live long enough...
Yesterday, 02:04 AM
Yesterday, 02:04 AM
donofsandiego: Return of the chatGPT writing prompt. Lets see how shinasukac responds to these questions utilizing the Socratic Method. Maybe he will give us an interesting look into his opinions
Last Thursday, 02:34 AM
Last Thursday, 02:34 AM
Willy Pete: I havent even seen a pershing yet. Coh3 games still move too fast for it lol
Last Thursday, 00:30 AM
Last Thursday, 00:30 AM
Lady Xenarra: Has anyone actually used the KT much? My experience is that the match is usually over long before I get the CPs for it
Last Wednesday, 14:35 PM
Last Wednesday, 14:35 PM
Rosbone: Can someone message me the day you can look at Coh3 and not face palm yourself in disbelief that actual humans worked on it? Much appreciated.
Last Wednesday, 06:40 AM
Last Wednesday, 06:40 AM
Rosbone: The only way to feel good about Coh3 is to never look at Coh3. Once you see it, you cant unsee it.
Last Wednesday, 06:37 AM
Last Wednesday, 06:37 AM
Rosbone: Observer mode sucks, player stats pages are scatter brained mess, etc etc etc
Last Wednesday, 06:35 AM
Last Wednesday, 06:35 AM
Rosbone: It is really hard to tell people to buy the DLC with feeling like they are throwing their money down the toilet for a nearly dead game. But Big Tonks!!! Oh well, not my problem.
Last Tuesday, 18:12 PM
Last Tuesday, 18:12 PM
Rosbone: No 4v4 maps, busted menus 2 years after release, still have not fixed janky sounds people have complained about for over 2 years, etc etc.
Last Tuesday, 18:10 PM
Last Tuesday, 18:10 PM
Rosbone: And the skirmish menus are still at a BETA level. Just the largest game play mode completely ignored... again.
Last Tuesday, 18:09 PM
Last Tuesday, 18:09 PM
Willy Pete: Oh wtf. Yeah the crossing remake was in the 2v2 demo. No more 3s and 4s is a bummer tho
Last Tuesday, 16:42 PM
Last Tuesday, 16:42 PM
aerafield: What? No, he means that all the new maps are for 1v1. Though Im pretty sure they will be playable in 2v2 as well
Last Tuesday, 15:50 PM
Last Tuesday, 15:50 PM
Willy Pete: Are the maps really locked behind dlc? Surely they must be in the regular update
Last Tuesday, 15:22 PM
Last Tuesday, 15:22 PM
Rosbone: I would like to join in celebration with the 9% of Coh3 MP players who are getting ALL of the new maps. Woohoo! #3Tards
21 Feb 2025, 19:22 PM
21 Feb 2025, 19:22 PM
Livestreams
![]() |
![]() |
![]() |
66 | ||
![]() |
![]() |
![]() |
962 | ||
![]() |
![]() |
![]() |
128 | ||
![]() |
![]() |
![]() |
1 |
Ladders Top 10
-
#Steam AliasWL%Streak
- 1.42863.872+6
- 2.302163.649+2
- 3.12644.741-1
- 4.312114.732+8
- 5.288111.722-1
- 6.193100.659+3
- 7.1171650.643+2
- 8.728425.631+1
- 9.14760.710-2
- 10.725443.621-2
Replay highlight
VS
-
cblanco ★
-
보드카 중대
-
VonManteuffel
-
Heartless Jäger

Einhoven Country

Honor it
13

Download
1328
Board Info
379 users are online:
379 guests
5 posts in the last 24h
23 posts in the last week
56 posts in the last month
23 posts in the last week
56 posts in the last month
Registered members: 52115
Welcome our newest member, 88clb vipone
Most online: 2043 users on 29 Oct 2023, 01:04 AM
Welcome our newest member, 88clb vipone
Most online: 2043 users on 29 Oct 2023, 01:04 AM