|
Post by keepitsimple on May 16, 2014 23:40:15 GMT 1
The player can lay a smokescreen. But is also possible to let the AI make a smokescreen? If so, how do you make this happen?
|
|
|
Post by Jagged Steel on May 16, 2014 23:46:55 GMT 1
I think you can accomplish that by using unit start commands in the editor. The switch shells to smoke, and then suppressive fire @x,y commands should do it. I think you might be able to do the same thing by script, but I recall an issue with some of the start commands that can be called directly on the unit while in the editor that can not be called via script. Changing shells might be one of those.
|
|
|
Post by keepitsimple on May 17, 2014 10:06:24 GMT 1
Unfortunately, there no unit command switch shells (as far as I can see). I thought I had the solution. I adjust the weapon file. Remove the normal shell and make the smoke shell the only shells it can use. Tried it, but it doesn't work. I would think that it odd to work, so I assume that I'm missing something. I did the following: I took the original weapon file from german 8cm mortar. Rename and removed the first shells entry, addjust the TrajectoryType from second entry from "1" to "0" and saved it. I addjust in mod-file of the 8cm mortar the weapon entry to my new weapon. It now doesn't shoot grenades but also doesn't shoot smoke grenades. <Shells> <item TrajectoryType="0" Piercing="7" PiercingRandom="0" DamagePower="9000" DamageRandom="1000" Area="5" Area2="0" ProjectileSpeed="80" DetonationPower="0" FireRate="60" RelaxTime="6" DamageType="2" TraceProbability="0" TraceSpeedCoeff="0.2"> <Specials Size="32"> <BitArray> <item data="0" /> <item data="0" /> <item data="0" /> <item data="0" /> <item data="0" /> </BitArray> </Specials> <InfantryFireSound></InfantryFireSound> <EffectGunFire>shootmortar1</EffectGunFire> <EffectTrajectory>mine1\1</EffectTrajectory> <EffectHitDirect>expsmokeshell1</EffectHitDirect> <EffectHitMiss>expsmokeshell1</EffectHitMiss> <EffectHitReflect>expsmokeshell1</EffectHitReflect> <EffectHitGround>expsmokeshell1</EffectHitGround> <EffectHitWater>expwater3</EffectHitWater> <EffectHitAir></EffectHitAir> <Craters /> <FlashFire Power="100" Duration="500" /> <FlashExplosion Power="200" Duration="500" /> </item> </Shells>
|
|
|
Post by Jagged Steel on May 17, 2014 14:10:13 GMT 1
Looks like you have a solution Kis, good work. I remember somebody working through this same issue a few years back, and I knew there were some commands that could only be called one way or the other. It appears that you can not change shells via start command. I do think there is a way to do it via script, but your solution sounds like it should perform like you want. I was curious abut this, so I took a look at Calvins .lua guide, and this is what it says: It looks like the solution you came up with may be the only way to do what you want. NOw that I am looking at this I think the action that I was thinking of that can be called via start command , but not script, is actually "Entrench Self", which I know does work via unit start command.
|
|
|
Post by keepitsimple on Oct 5, 2014 21:54:52 GMT 1
Solved it at least You take the setting of the smoke grenade of weapon and copy this for the first (see above in this thread for example). The only thing you must change is the DamageType (for the second entry this 2) this must "0". As I did. I was almost right the last time. The only reason it didn't work then was that I left out the second entry (the original smokegrenade entry). Why this still has to be present, I don't know, but without it, I couldn't get it to work. With script I can now lay a smokescreen for AI. This a modding solution and hence this topic is in the wrong thread.
|
|
kaoz
General
inter faesces et urinam nascimur
Posts: 1,112
|
Post by kaoz on Oct 5, 2014 23:24:44 GMT 1
Have you tried this one?
iAction = 46 – CHANGE SHELL TYPE : Cmd(46, ...) · ERROR - UNKNOW COMMAND!!! · This command doesn’t seems to work through a script call !
LUA guide says it doesn't work, but i never tested it, so when you add ScriptID, maybe it does work, who knows...?
|
|
|
Post by keepitsimple on Oct 6, 2014 18:12:21 GMT 1
Calvin's Lua Guide is correct.
This command doesn't work.
|
|