Knuckle Cracker

Creeper World 3 => The Coder's Corner => Topic started by: Ondrejoda on June 12, 2017, 01:40:29 AM

Title: Could someone help me with modifiing Chimera cannons?
Post by: Ondrejoda on June 12, 2017, 01:40:29 AM
Can I change the code that it can locate Creeper and shoot AC, when AC Ammo is in the cannon?
Title: Re: Could someone help me with modifiing Chimera cannons?
Post by: Ondrejoda on June 12, 2017, 05:06:08 AM
Because i would like to change the code to be an ally that it will shoot AC onto the creeper.
Title: Re: Could someone help me with modifiing Chimera cannons?
Post by: GoodMorning on June 12, 2017, 05:25:28 AM
I don't know the original mission, so I can do little for you.
Title: Re: Could someone help me with modifiing Chimera cannons?
Post by: Ondrejoda on June 12, 2017, 05:42:38 AM
If you did win the story mode, it is in the "Alpha Sector":wirgilw:Chimera, and i can post the code too, but not now. Sorry. (and could you check my other topic?)
Title: Re: Could someone help me with modifiing Chimera cannons?
Post by: GoodMorning on June 12, 2017, 06:43:40 AM
Yes, but recreating is probably easier than modifying.

Something like...


$Capacity:100
$ShotAmount:10

once
@InitialiseFiringState #Time until armed, ammunition level, capacity, connectability, etc...
@SetupGraphics
endonce

Self CONST_AMMOAC GetUnitAttribute <-ShotAmount gte if
@FindTargetCreeperCell
<-CreeperInRange if
@CreateProjectile
@BarrelRecoil
Self CONST_AMMOAC dup2 GetUnitAttribute <-ShotAmount sub SetUnitAttribute
endif
endif