Massassi Forums Logo

This is the static archive of the Massassi Forums. The forums are closed indefinitely. Thanks for all the memories!

You can also download Super Old Archived Message Boards from when Massassi first started.

"View" counts are as of the day the forums were archived, and will no longer increase.

ForumsCog Forum → Probably an easy question...
Probably an easy question...
2001-08-10, 5:10 AM #1
Ok this is what I want to happen when u get enough power cells u automaticly get a new weapon and this is what I've come up w/
Code:
symbols 
int       player        local
int       bin=12        local
int       powerlvl      local
Flex      pl1=50        local
Flex      wepadd=1
message   startup
end 
# ======================================================================================== 
code 
startup:
player=GetSourceRef();
powerlvl=GetInv(player,bin);
if (powerlvl>=pl1)
{
ChangeInv(player,6,wepadd); 
}


Return;
end

I know the synatx isn't wrong cause cogwriter didn't come up w/ anything but is there something I'm missing??any help would be appreciated

lata,
C_T

[This message has been edited by C_T (edited August 10, 2001).]
So young so angry damn that rap music
2001-08-10, 7:36 AM #2
The if-condition is only checked at startup, you need to do it in a pulse or after the "taken" message.

-Raze
--
You are all just jealous because you can't hear the small voices!!
2001-08-10, 8:01 AM #3
ohhh hehe so it was an eay one thanx a million

lata
C_T
So young so angry damn that rap music
2001-08-10, 8:29 AM #4
Hey,

it still doesn't work could someone tell me which verb I need to use to do it and how it might be setup. I've tried SetPulse(1.0) but I couldn't find any descriptions on how it is supposed to be used so I robably did it wrong.

Thanx
C_T
So young so angry damn that rap music
2001-08-10, 9:23 AM #5
symbols
int player local
int bin=12 local
int powerlvl local
Flex pl1=50 local
Flex wepadd=1
message taken
message startup
end
# ========================================================================================
code
startup:
player = GetLocalPlayerThing();
return;
taken:
powerlvl=GetInv(player,bin);
if (powerlvl>=pl1)
{
ChangeInv(player,6,wepadd);
}
Return;
end


try that one.. dunno if it'll work it should but I am not sure.. else try that one

symbols
int player local
int bin=12 local
int powerlvl local
Flex pl1=50 local
Flex wepadd=1
message startup
message pulse
end
# ========================================================================================
code
startup:
player=GetLocalPlayerThing();
SetPulse(1.0);
return;
pulse:
powerlvl=GetInv(player,bin);
if (powerlvl>=pl1)
{
ChangeInv(player,6,wepadd);
SetPulse(0);
}
Return;
end




[This message has been edited by Raze (edited August 10, 2001).]
--
You are all just jealous because you can't hear the small voices!!

↑ Up to the top!