Cannot get CRPL core to request ammo

Started by HiggsBoson12, October 30, 2014, 01:50:13 PM

Previous topic - Next topic

HiggsBoson12

I have a CRPL core that will be performing an essential part in my map "Saving Humanity Part 6." The supposed job is to take in a ton of ammo packets, and then spit out AntiCreeper. I was debugging the script, and the unit will not request ammo packets from my command node, whether it is from the CN itself, or through a collector. It shows the network connected line, but won't request ammo packets. I am using v 2.08 of the game. Here is the partial script.
#declare all of the constants that might be needed
once
#IMPORTANT CONSTANTS
Self CONST_CANREQUESTAMMO True SetUnitAttribute
Self CONST_CONNECTABLE True SetUnitAttribute


Self CONST_COUNTSFORVICTORY False SetUnitAttribute

#IMPORTANT CONSTANT
Self CONST_MAXAMMO 3000 SetUnitAttribute

Self CONST_NULLIFIERDAMAGES False SetUnitAttribute

#IMPORTANT CONSTANTS
Self CONST_PACKETREQUESTDELAY 10 SetUnitAttribute
Self CONST_SHOWAMMOBAR True SetUnitAttribute
Self CONST_AMMO 0 SetUnitAttribute
endonce

Self CONST_AMMO 3000 eq if
CurrentCoords -1000 AddCreeper
Else
"Needs to charge" SetPopupText
endif
P.S. It also does not show the ammo bar, although I don't know if this is a side effect, or something else that I haven't got right. Issues not related to the whole requesting ammo thing may exist, but the main focus is the ammo portion. I think I know how to fix anything else. Still, I would appreciate any help.
CRPL=Fun=Frustration

stdout

Quote from: HiggsBoson12 on October 30, 2014, 01:50:13 PM
Self CONST_AMMO 0 SetUnitAttribute

Wouldn't that line set the ammo in the core to 0 every frame?

HiggsBoson12

#2
Quote from: stdout on October 30, 2014, 01:57:23 PM
Quote from: HiggsBoson12 on October 30, 2014, 01:50:13 PM
Self CONST_AMMO 0 SetUnitAttribute

Wouldn't that line set the ammo in the core to 0 every frame?
I thought i stuck it inside a "once" and "endonce" section so it would only execute once.  :-\
CRPL=Fun=Frustration

stdout

You're right, I misunderstood what once did.

Hopefully someone who knows what they are talking about will have your answer. :)

HiggsBoson12

Thank you for trying. I just don't understand why my CN refuses to send ammo packets. Maybe the robots are on strike  ;D
CRPL=Fun=Frustration

Grayzzur

You also need to set CONST_REQUESTPACKETS  to true. That's sort of the master switch for energy and ammo.
"Fate. It protects fools, little children, and ships named 'Enterprise.'" -William T. Riker

HiggsBoson12

CRPL=Fun=Frustration

HiggsBoson12

CRPL=Fun=Frustration

Somebeing

Maybe you can check these boxes that I attached and make sure that the ones you want are checked. Just select the CRPL core and scroll down.

It is sort of a stupid idea, but it actually worked for me. Check it, save the map and it might work.

Bloody two years and I never knew you could scroll down and check those boxes...grumble grumble.

Good luck!

HiggsBoson12

Thanks, I will try that as soon as I can, and then I will let you know.
CRPL=Fun=Frustration

HiggsBoson12

I did it, and it worked! Thank you for your help!  ;D ;D ;D
CRPL=Fun=Frustration