Author |
Message |
weegee
DRL Developer
Joined: Thu Jun 11, 2009 2:34 pm Posts: 966 Location: Moscow, Russia
|
Strange bugs in campaign mission
Hi, I've made a campaign mission. It is almost playable and debugged. At least there are no errors in the LUA console, an everything works and triggers fine. But there are strange bugs which I can't figure out how to handle. And I don't even understand their nature. I guess that quite big LUA script somehow cripples internal state of the engine and it leads to weird ingame behaviour.
Examples of weirdness are: - Dummies spawned in tower are trying to get to the dummy controllers insted of brainhunting as set in the script. - Dummies spawned form dropships are trying to kill their own dropships. - Heavy brain robot suddenly explodes causing defeat, like if bullets fired inside the tower could hit the brain in the coalition mini bunker.
Any ideas why this can happen? Maybe too much LUA or bad scene (derived from "flatzone large")?. Any help would be appreiated.
|
Mon Jun 22, 2009 1:04 pm |
|
|
ProjektTHOR
Banned
Joined: Tue Feb 27, 2007 4:05 pm Posts: 2527
|
Re: Strange bugs in campaign mission
Lua.
Good lord, this is like a disease out of control.
|
Mon Jun 22, 2009 1:41 pm |
|
|
mail2345
Joined: Tue Nov 06, 2007 6:58 am Posts: 2054
|
Re: Strange bugs in campaign mission
I would say large scene.
And no, lua does not corrupt the internal engine.
|
Mon Jun 22, 2009 6:09 pm |
|
|
Grif
REAL AMERICAN HERO
Joined: Sat Jan 27, 2007 10:25 pm Posts: 5655
|
Re: Strange bugs in campaign mission
Hit Ctrl + P and tell us how many MOIDs it displays when ♥♥♥♥ starts getting weird.
Negative points if it's over 255.
|
Mon Jun 22, 2009 7:38 pm |
|
|
weegee
DRL Developer
Joined: Thu Jun 11, 2009 2:34 pm Posts: 966 Location: Moscow, Russia
|
Re: Strange bugs in campaign mission
Yeah, I've got 240 of them from the begining, and about 265 when glitches come out. Any ways to decrease them on start? Maybe rebuid scene using less materials? Ofcourse I'll add limit checking code on all LUA spawns.
|
Tue Jun 23, 2009 6:51 am |
|
|
mail2345
Joined: Tue Nov 06, 2007 6:58 am Posts: 2054
|
Re: Strange bugs in campaign mission
Code: if MovableMan:GetMOIDCount() < 240 and Is what TLB uses for his vanilla areas.
|
Tue Jun 23, 2009 6:53 am |
|
|
LowestFormOfWit
Joined: Mon Oct 06, 2008 2:04 am Posts: 1559
|
Re: Strange bugs in campaign mission
I think you're missing some of that snippet..
|
Tue Jun 23, 2009 7:06 am |
|
|
mail2345
Joined: Tue Nov 06, 2007 6:58 am Posts: 2054
|
Re: Strange bugs in campaign mission
I left the part out so he could add it to his existing if statements.
|
Tue Jun 23, 2009 7:17 am |
|
|
Grif
REAL AMERICAN HERO
Joined: Sat Jan 27, 2007 10:25 pm Posts: 5655
|
Re: Strange bugs in campaign mission
for actor in MovableMan.Actors do if MovableMan:GetMOIDCount() >= 250 then actor:GibThis(); end end
This is the only efficient way to solve your problem and will work without any problems 100% of the time. I suggest all mod makers put this into mods. And scenes.
|
Tue Jun 23, 2009 7:31 am |
|
|
mail2345
Joined: Tue Nov 06, 2007 6:58 am Posts: 2054
|
Re: Strange bugs in campaign mission
And if the gibs are greater than the attachables?
EDIT: Oh, I would recomend killing the last actor instead, by writing it to a table, and deleting the last entries.
|
Tue Jun 23, 2009 7:54 am |
|
|
411570N3
Joined: Wed Jan 07, 2009 10:26 am Posts: 4074 Location: That quaint little British colony down south
|
Re: Strange bugs in campaign mission
Gibs don't count in the MOID limit.
|
Tue Jun 23, 2009 8:33 am |
|
|
weegee
DRL Developer
Joined: Thu Jun 11, 2009 2:34 pm Posts: 966 Location: Moscow, Russia
|
Re: Strange bugs in campaign mission
I've cut about 1K of pixels from the map, and removed all unnecessary blocks, dummies and weapons. Now I have about 160 MOIDs from start. Hope it will be enough to avoid glitches without killing poor helpless dummies. Thanks a lot.
|
Tue Jun 23, 2009 9:35 am |
|
|
TheLastBanana
DRL Developer
Joined: Wed Dec 13, 2006 5:27 am Posts: 3138 Location: A little south and a lot west of Moscow
|
Re: Strange bugs in campaign mission
160 should be good. Just for future reference, all of the following count as 1 MOID: Actors ADoors AHumans ACrabs ACRockets ACDropships Arms Legs Heads Attachables HDFirearms HeldDevices For instance, a Coalition Heavy Soldier equipped with a Heavy Sniper Rifle would have: 2 legs 2 arms 1 head 1 helmet 1 torso/actor 1 chest plate 1 weapon __________ 9 MOIDs. A dummy turret has 11, so avoid those. Long doors have 2 (door and motor) and tunnel doors have 2 doors, so they have 4 MOIDs. All of this adds up. Be sure to add actors very carefully.
|
Tue Jun 23, 2009 9:59 pm |
|
|
weegee
DRL Developer
Joined: Thu Jun 11, 2009 2:34 pm Posts: 966 Location: Moscow, Russia
|
Re: Strange bugs in campaign mission
Great reference. Now I doubt where I can put all this info in Wiki. To the Modding\Scenes or to the LUA sections?
|
Wed Jun 24, 2009 6:50 am |
|
|
Grif
REAL AMERICAN HERO
Joined: Sat Jan 27, 2007 10:25 pm Posts: 5655
|
Re: Strange bugs in campaign mission
It's a general knowledge piece of information that applies to ALL modding, so it shouldn't go into a lua section.
|
Wed Jun 24, 2009 7:09 am |
|
|
|