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 → basic cutscene cog
basic cutscene cog
2002-12-30, 4:00 PM #1
Why doesn't this cog work? (It's supposed to just show what CameraThing sees from it's 1st person POV)
So here it is:
Code:
##########################
# Jedi Knight Cog Script #
# Opening cutscene       #
# Created 12.30.02       #
##########################


##########################
symbols

message activated
thing CameraThing

end

##########################
code
activated:

SetCameraFocus(0, CameraThing);
Sleep(2.0);

end


[This message has been edited by GabrielBlumenthal (edited December 30, 2002).]
"Intelligent people know of what they speak; fools speak of what they know."

- Minchas Shabbos Pirkei Avos 3:18 / Ethics Of The Fathers
2002-12-30, 4:19 PM #2
How is it activated? Should the message be "startup" instead?
Daddy, why doesn't this magnet pick up this floppy disk?
2002-12-30, 4:22 PM #3
Yeah, just change "Activated" to "Startup"
And when the moment is right, I'm gonna fly a kite.
2002-12-30, 4:24 PM #4
What's the difference between Activated: and Startup:
"Intelligent people know of what they speak; fools speak of what they know."

- Minchas Shabbos Pirkei Avos 3:18 / Ethics Of The Fathers
2002-12-30, 4:28 PM #5
I would have hoped it was self-explanitor, but I guess it isnt.

From the Datamaster:

Quote:
<font face="Verdana, Arial" size="2">
The Activated message is sent by a surface or thing when it is nudged.
</font>


Quote:
<font face="Verdana, Arial" size="2">
Startup is sent to all cogs after a level has loaded and just before you can see anything. It is called shortly before the loading message.
</font>
And when the moment is right, I'm gonna fly a kite.
2002-12-30, 4:31 PM #6
uh, i just changed the activated: to startup:, but it did nothing. i'm wondering if maybe I have to lock up the player or something.
"Intelligent people know of what they speak; fools speak of what they know."

- Minchas Shabbos Pirkei Avos 3:18 / Ethics Of The Fathers
2002-12-30, 4:32 PM #7
Code:
# 12/2002 GBK
Symbols
Message Startup
Thing Cam
End
Code
Startup:
Setcamerafocus(0, Cam);
Stop;
End
And when the moment is right, I'm gonna fly a kite.
2002-12-30, 4:35 PM #8
Yeah, he didnt have Return; or Stop; at the end of his cog.
Daddy, why doesn't this magnet pick up this floppy disk?
2002-12-30, 4:47 PM #9
That wouldnt prevent it from working, but it would cause problems.
And when the moment is right, I'm gonna fly a kite.
2002-12-30, 7:20 PM #10
After a bit of modification, here's the new version, but st1 doesn't move towards the ghost object thing_to_move_to_1. Here's the code:
Code:
# Jedi Knight Cog Script 
# Opening cutscene
# Created 12.30.02

##########################
symbols

message startup
thing    CameraThing
thing    player                 local
thing    kyle                   local
thing    st1
thing    thing_to_move_to_1

template gunless=KyleBryarActor local

End

##########################
code
startup:

# set up first 
player = GetLocalPlayerThing();
jkBeginCutscene();

# switch the player for an Actor
SetActorFlags(player, 0xa00000);
StopThing(player);
Kyle = CreateThing(gunless, player);
StopThing(Kyle);
SetThingCurGeoMode(player, 0);

# start cutscene
SetCameraFocus(0, CameraThing);
Sleep(10.0);
SetCameraFocus(0, jkGetLocalPlayer());
AiSetMode(st1,0x1);
AiSetMoveThing(st1, thing_to_move_to_1); 

# end cutscene
jkEndCutscene();

# switch back to player focus
SetCameraFocus(0, Player);

# unfreeze the player
ClearActorFlags(Player, 0xa00000); 
SetThingCurGeoMode(player, 4);
Stop;

End
"Intelligent people know of what they speak; fools speak of what they know."

- Minchas Shabbos Pirkei Avos 3:18 / Ethics Of The Fathers
2002-12-31, 6:03 AM #11
This probably isnt the solution, but aren't "//" supposed to be used in the code, not "#". Also, I've never seen the jkBegin and jkEnd cutscene verbs. Do they exist if im wrong, please wipe away my smile of ignorance.
Daddy, why doesn't this magnet pick up this floppy disk?
2002-12-31, 6:30 AM #12
the jkbegincutscene and endcutscene are mots only and are totally futile get rid of them.

I don't think you can use special characters in your names, so get rid of the UNDERSCOREs.
APT 1, 2, 3/4, 5/6
TDT
DMDMD

http://veddertheshredder.com
2002-12-31, 8:36 AM #13
Ok, I got rid of jkBeginCutscene and jkEndCutscene, and it works fine except st1 doesn't move at all. I thought about using MoveToFrame(), but the stormtrooper wouldn't walk, would it? I've done MoveToFrame with ships before and they just float in the air...
Is there any other function that could make it walk to a certain destination?
"Intelligent people know of what they speak; fools speak of what they know."

- Minchas Shabbos Pirkei Avos 3:18 / Ethics Of The Fathers
2002-12-31, 9:34 AM #14
Pull out the "AIsetmode".
And when the moment is right, I'm gonna fly a kite.
2002-12-31, 9:59 AM #15
St1 still did nothing...
Here's the code:
Code:
# Jedi Knight Cog Script 
# Opening cutscene
# Created 12.30.02

##########################
symbols

message  startup
thing    CameraThing
thing    player                 local
thing    kyle                   local
thing    St1
thing    TargetForSt1

template gunless=KyleBryarActor local

End

##########################
code
startup:

# set up first 
player = GetLocalPlayerThing();

# switch the player for an Actor
SetActorFlags(player, 0xa00000);
StopThing(player);
Kyle = CreateThing(gunless, player);
StopThing(Kyle);
SetThingCurGeoMode(player, 0);

# start cutscene
SetCameraFocus(0, CameraThing);
Sleep(10.0);
SetCameraFocus(0, jkGetLocalPlayer());
AiSetMoveThing(St1, TargetForSt1); 

# switch back to player focus
SetCameraFocus(0, Player);

# unfreeze the player
ClearActorFlags(Player, 0xa00000); 
SetThingCurGeoMode(player, 4);
Stop;

End
"Intelligent people know of what they speak; fools speak of what they know."

- Minchas Shabbos Pirkei Avos 3:18 / Ethics Of The Fathers
2002-12-31, 10:02 AM #16
What is "St1"? Does it have an AI?
And when the moment is right, I'm gonna fly a kite.
2002-12-31, 11:10 AM #17
St1 is a stormtrooper.
"Intelligent people know of what they speak; fools speak of what they know."

- Minchas Shabbos Pirkei Avos 3:18 / Ethics Of The Fathers
2002-12-31, 12:07 PM #18
Is it referenced by any other cogs? What are its thingflags?
And when the moment is right, I'm gonna fly a kite.
2003-01-01, 10:15 AM #19
never mind, I took out the Sleep(10.0); and some other stuff and I got it to work.
[sighs]Why it works is another question...[/sighs]
"Intelligent people know of what they speak; fools speak of what they know."

- Minchas Shabbos Pirkei Avos 3:18 / Ethics Of The Fathers

↑ Up to the top!