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)

1 user is browsing this thread:
1 guest
Livestreams
![]() |
![]() |
![]() |
94 | ||
![]() |
![]() |
![]() |
22 | ||
![]() |
![]() |
![]() |
155 | ||
![]() |
![]() |
![]() |
62 | ||
![]() |
![]() |
![]() |
41 | ||
![]() |
![]() |
![]() |
15 | ||
![]() |
![]() |
![]() |
12 | ||
![]() |
![]() |
![]() |
1 | ||
![]() |
![]() |
![]() |
1 | ||
![]() |
![]() |
![]() |
1 |
Ladders Top 10
-
#Steam AliasWL%Streak
- 1.693240.743+13
- 2.43664.872+5
- 3.15651.754+8
- 4.314119.725+10
- 5.380114.769+2
- 6.310173.642+5
- 7.289131.688+5
- 8.675103.868+1
- 9.279149.652+2
- 10.589.866-1
Replay highlight
VS
-
cblanco ★
-
보드카 중대
-
VonManteuffel
-
Heartless Jäger

Einhoven Country

Honor it
15

Download
1424
Board Info
335 users are online:
335 guests
0 post in the last 24h
4 posts in the last week
8 posts in the last month
4 posts in the last week
8 posts in the last month
Registered members: 55785
Welcome our newest member, Dronebur
Most online: 2043 users on 29 Oct 2023, 01:04 AM
Welcome our newest member, Dronebur
Most online: 2043 users on 29 Oct 2023, 01:04 AM