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: @OKSpitfire tbh I find it quite challenging to get the Pershing in time, having to suffer through the CoH3 tickrate and this endless bullshit meta of massive blobs going back and forth to the forward heal truck
Today, 17:24 PM
Today, 17:24 PM
OKSpitfire: Well... going to be seeing the Pershing a lot for a little while, that thing is a monster.
Today, 11:44 AM
Today, 11:44 AM
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
Livestreams
![]() |
![]() |
![]() |
204 | ||
![]() |
![]() |
![]() |
100 | ||
![]() |
![]() |
![]() |
38 | ||
![]() |
![]() |
![]() |
33 | ||
![]() |
![]() |
![]() |
29 | ||
![]() |
![]() |
![]() |
27 | ||
![]() |
![]() |
![]() |
18 | ||
![]() |
![]() |
![]() |
16 | ||
![]() |
![]() |
![]() |
4 | ||
![]() |
![]() |
![]() |
69 |
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.731426.632+1
- 8.1171650.643+2
- 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
704 users are online:
704 guests
3 posts in the last 24h
23 posts in the last week
55 posts in the last month
23 posts in the last week
55 posts in the last month
Registered members: 52120
Welcome our newest member, shafbartn48
Most online: 2043 users on 29 Oct 2023, 01:04 AM
Welcome our newest member, shafbartn48
Most online: 2043 users on 29 Oct 2023, 01:04 AM