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 → Trigger Problems
Trigger Problems
2004-05-27, 4:11 AM #1
I never did understand these.

In my weapon cog, I'm sending trigger 1 to deactivate all camera cogs.

Weapon cog excerpt:
Code:
selected:

   player = GetSourceRef();

   // Setup the meshes and models.
   jkSetPOVModel(player, povModel);
   jkSetWeaponMesh(player, weaponMesh);
   SetArmedMode(player, 1);
   weaponpov=CreateThing(povtemp, player);
   SetThingPos(weaponpov, GetThingPos(player));
   AttachThingToThingEx(weaponpov, player, 0x8);
   SetThingModel(weaponpov, povModel);
   SendTrigger(1, trigID, 0, 0, 0, 0);


Camera cog:
Code:
# 02_camespecial.cog
# [Grismath]
#======================================================================================#
symbols
message	entered
message	trigger
sector	entSect
thing	camera
int	on=1	local
int	trigID=1
end
#======================================================================================#
code
#--------------------------------------------------------
entered:
if(GetSenderRef()==entSect && on==1) {
 SetCameraFocus(0, camera);
}
return;
#--------------------------------------------------------
trigger:
if(GetSourceRef()==trigID) {
 on=GetParam(0);
}
return;
#--------------------------------------------------------
end
Cordially,
Lord Tiberius Grismath
1473 for '1337' posts.
2004-05-27, 10:19 AM #2
Try "SendTrigger(-1, TrigID, 0, 0, 0, 0);"

------------------
for(i = 0; i < 00; i = i + 1) Print("massassi is good");
PrintInt(i); //print the integer value of infinity
May the mass times acceleration be with you.
2004-05-27, 10:33 AM #3
No, no, hahaha, that was part of it, but it was mainly because I forgot to define trigID for the weapon cog. :]
Cordially,
Lord Tiberius Grismath
1473 for '1337' posts.
2004-05-27, 10:44 AM #4
Heh heh. Yeah, that'll do it [http://forums.massassi.net/html/smile.gif]

------------------
for(i = 0; i < 00; i = i + 1) Print("massassi is good");
PrintInt(i); //print the integer value of infinity
May the mass times acceleration be with you.
2004-05-27, 2:23 PM #5
Dang it [http://forums.massassi.net/html/frown.gif] - I saw this thread earlier today and thought that the assigning (or lack thereof) may be the problem, but I wanted to wait until I got home to check the DataMaster before sending you on a wild goose-chase... [http://forums.massassi.net/html/wink.gif]

Besides, seems like you guys have got the problem all stitched up now [http://forums.massassi.net/html/biggrin.gif]

-Jackpot

------------------
"lucky_jackpot is the smily god..." - gothicX

"Life is mostly froth and bubble, but two things stand in stone,
Kindness in another's trouble, courage in your own"
("Ye Wearie Wayfarer" - by Adam Lindsay Gordon)

And he's finally off the starting grid --> Zooooom -@%
"lucky_jackpot is the smily god..." -gothicX
"Life is mostly froth and bubble, but two things stand in stone,
Kindness in another's trouble, courage in your own"
- "Ye Wearie Wayfarer"
|| AI Builder: compatible with both JK & MotS || My website ||

↑ Up to the top!