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 → Why am i a bad cog'er.
Why am i a bad cog'er.
2003-03-07, 7:48 AM #1
why wont this cut seen cog evan activate.
Code:
#Cutscen Level master COG
#Generated by PJB (pokejoyboy@aol.com, pjb@pjb.i8.com) 
#credit to Antony Espindola for making the tutor that 
#helped me make this cog.

symbols   
message   startup	
thing	Cameraone	
thing      player        
thing      kyle  	  local
thing	bombghost	   	    
template   gunless	 
float	speed		
sound	shot		
keyframe    crouch   
end

code

startup:

 // setup first
 player = GetLocalPlayerThing();
 jkBeginCutscene();
    // switch the player for an Actor
    SetActorFlags(player, 0xa00000);
    StopThing(player);
    Kyle = CreateThing(gunless, player);
    StopThing(Kyle);
    SetThingCurGeoMode(player, 0);
	  // switch to camera view one
	  SetCameraFocus(0, Cameraone);
	    print("uhhh.....")
	    sleep(PlayKey(Kyle, crouch, 1, 0x4));
	    MoveToFrame(Cameraone, 1, speed);
	    AISetMoveSpeed(Kyle, 1.0);
	    print("Where am I? and for that matter Who am i?")
	    sleep(AISetLookPos(Kyle, GetThingPos(BombGhost)));
	    MoveToFrame(Cameraone, 2, speed);
	    AISetMoveThing(Kyle, BombGhost);
	    MoveToFrame(Cameraone, 3, speed);
	    print("I must have lost my memory, but why? and how did i do it here?")
	    PlaySoundLocal(shot,0.6, 0.0,0x4); 
	    print("What was that?")
return;
end

I am a bad cog'er.....

------------------
I am pjb.
Another post......
another moment of my life wasted.....
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-03-07, 9:31 AM #2
Try putting semicolons ( [http://forums.massassi.net/html/wink.gif] at the end of the print statements. Also get Parsec and maybe DM. Parsec is extremly helpful tool for a cogger. 1 more thing, JK or MotS?

------------------
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-03-07, 10:18 AM #3
Its sposed to be for JK, i will try and get it workin useing those tools.

------------------
I am pjb.
Another post......
another moment of my life wasted.....
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-03-08, 3:31 AM #4
'jkBeginCutscene();' - thats a MotS verb, you can't have those in JK. Thats a big no no. Also, add some sleeps to the cutscene, otherwise it will allrunatonce. [http://forums.massassi.net/html/wink.gif]

------------------
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-03-08, 7:21 AM #5
ok so no Mots verbs, that parsec ad scrpt things wont work, i cant get windows to put the 1% after them.

------------------
I am pjb.
Another post......
another moment of my life wasted.....
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-03-08, 7:23 AM #6
oh, and i dont realy know how i add sleep comands, as you can see in that cog.

------------------
I am pjb.
Another post......
another moment of my life wasted.....
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-03-08, 8:26 AM #7
Code:
Symbols
Message Startup
End
Code
Startup:

Sleep(1);  //A sleep of one second.

Print("Blah blah blah");

Sleep(1);  //Another one second sleep.

Print("More blah blah");

Sleep(2);  //A sleep of 2 seconds.

JKendlevel(1);  //Then end the level.

Stop;
End


In the above cog, one second after startup, the message "Blah blah blah" wil be printed to the console. One second later, "More blah blah blah" wil be printed. 2 seonds later, the level will end.


The syntax of the Sleep command is simple. Sleep(seconds); where 'seconds' is the amount of time (in seconds, obviously) that you want the cog to sleep.


Sleep(10); //Sleep ten seconds.

Sleep(60); //Sleep for one minute.

Sleep(Rand()*10) //Sleep for a random amount of time, between 0 and 10 seconds.



------------------
Createthingatpos(GBK, 0, '0 0 0', '0 0 0');
And when the moment is right, I'm gonna fly a kite.
2003-03-08, 10:53 AM #8
I think he knows what sleep(flex); is... What he is asking is how does he delay the cog for the time it takes a key to be played.

/Edward
Edward's Cognative Hazards
2003-03-09, 3:06 AM #9
ja, how do i do it for a certain key? and why wont it activate at startup?

------------------
I am pjb.
Another post......
another moment of my life wasted.....
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?

↑ Up to the top!