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 → PJB, your cog has a problem
PJB, your cog has a problem
2003-05-26, 10:37 AM #1
the AI shows up at the begining, but the switch dont respawn them. I set the switch up right and ive double checked and double checked.

------------------
I and only I know what I'm thinking.
<SalvadorChicka> i wasn't all "omg canadians have sex with each other!"
2003-05-26, 11:01 AM #2
oh man, can you post it, i lost the old one...

------------------
I am pjb.
Another post......
another moment of my life wasted.....
at least i made a level.
PJB's JK page's

-the PJB jedi rule book-
rule one, "never trust a bartender with bad grammar"-kyle katarn in JO

Rule Two, "Gravity is a crule misstress" -kyle katarn in MotS, and the alternatior MK I in AJTD
I am Darth PJB!
well, go on, run away!

i have a plastic lightsaber and a jedi cape.. am i a nerd?

If gravity is a crule mistress, and bar tenders with bad grammar are untrustworthy, what is air?
2003-05-28, 2:20 PM #3
here ya go

------------------
I and only I know what I'm thinking.

[This message has been edited by COTF_Dude (edited May 28, 2003).]
<SalvadorChicka> i wasn't all "omg canadians have sex with each other!"
2003-05-28, 2:22 PM #4
srry w# Jedi Knight Cog Script
#
# syncswitch.cog
# this cog will "spawn" a AI at a ghost position
# it also partaily "syncs" there psoiton so not to mutch trouble
# with that.
# it will activate on startup or when you activate a switch.
# [PJB]
symbols
surface switch linkid=0
thing generator_pos=-1
message startup
message activated
message killed
message pulse
sector enterme
thing dude linkid=1 local
template enemy_tpl desc=enemy_to_generate
int top=0 local
end
## Code Section
code
//-------------------------------------------------------------------------------------------------
startup:
if (top==0)
{
dude=CreateThing(enemy_tpl, generator_pos);
SetPulse(0.1);
top=1;
}
return;
activated:
if (GetSenderID()==0)
{
if (top==0)
{
dude=CreateThing(enemy_tpl, generator_pos);
SetPulse(0.1);
top=1;
}
}
return;
pulse:
SyncThingState(dude);
return;
killed:
if (GetSenderID()==1) top=0;
return;
end
rong one

------------------
I and only I know what I'm thinking.
<SalvadorChicka> i wasn't all "omg canadians have sex with each other!"
2003-05-29, 4:02 AM #5
Code tags!!!!

------------------
The Sniper Missions. Current project, The Sniper Missions

The Magician Saber System.
Major projects working on:
SATNRT, JK Pistol Mod, Aliens TC, Firearms

Completed
Judgement Day (HLP), My level pack
2003-05-29, 10:19 AM #6
?????


------------------
I and only I know what I'm thinking.
<SalvadorChicka> i wasn't all "omg canadians have sex with each other!"
2003-05-29, 11:23 AM #7
heres a fixed version of the cog. it should work. mostly i just modified pjb's cog.
now you can either have a surface or thing (or both) be the switch.
Code:
#=====
# Jedi Knight Cog Script
#
# syncswitch.cog
# this cog will "spawn" a AI at a ghost position
# it also partaily "syncs" there psoiton so not to mutch trouble
# with that.
# it will activate on startup or when you activate a switch.
# [PJB]
#=====
symbols
#-----
message   startup
message   activated
message   killed
message   pulse
surface   switch_surf        linkid=1
thing     switch_thng=-1     linkid=1
thing     generator_pos=-1
thing     enemy=-1     local
template  enemy_tpl
#-----
end
#=====
code
#-----
startup:
  Sleep(1.0);
  if(enemy == -1)
    {
    enemy = CreateThing(enemy_tpl, generator_pos);
    CaptureThing(enemy);
    SetPulse(0.1); 
    }
return;
#-----
activated:
  if(GetSenderID() != 1) return;
  if(enemy == -1)
    {
    enemy = CreateThing(enemy_tpl, generator_pos);
    CaptureThing(enemy);
    SetPulse(0.1); 
    }
return;
#-----
pulse:
  SyncThingState(enemy);
return;
#-----
killed:
  if(GetSenderRef() != enemy) return;
  ReleaseThing(enemy);
  enemy = -1;
  SetPulse(0.0);
return;
#=====
end

^^^^^--with code tags--^^^^^
code tags make the cog easier to read and understand. go here to figure out what they are.

------------------
Famous last words - "It seemed like a good idea at the time."

[This message has been edited by DSLS_DeathSythe (edited May 29, 2003).]
Famous last words - "It seemed like a good idea at the time."

↑ Up to the top!