Non-interactive introduction scene

Started by Sylvr, Sun 03/09/2006 00:25:55

Previous topic - Next topic

Sylvr

I know this was posted earlier, but I don't understand anything about the code that is being talked about. Here's what I'm trying to do:

I would like to make an introduction scene, where one character walks out a door, and meets another character who is already there. They walk towards each other and begin a conversation. They head down the street (up on the screen).

Could someone please help me with coding and where it goes in the (global) script?

Thanks much.
| Ben304: "Peeing is a beautiful thing, Sylvr" |


Sylvr

what does "Error: Must have an instance of the struct to access a non-static member" mean?
| Ben304: "Peeing is a beautiful thing, Sylvr" |

Khris

This means that you've used e.g. Object.Animate(...) instead of oDoor.Animate(...).

Sylvr

#4
okay, so how do I turn that into causing my character to walk automatically?
sorry, I'm really confused.Ã,  ???

And how do I fix an "Error: Parse Error: Unexpected 'Start Cutscene'"?
| Ben304: "Peeing is a beautiful thing, Sylvr" |

Ali

#5
Like this:

cEgo.Walk (x, y, eBlock);

With the new style scripting, you tell AGS what thing you want to act upon (cEgo/cVillain), then tell it what to do(Walk/Animate etc.).

You would probably want to put your introduction cutscene in the 'first time player enters room' in the interactions editor of the room in which the intro takes place.

Ashen

Quote from: SilverTrumpet on Mon 04/09/2006 16:14:06
And how do I fix an "Error: Parse Error: Unexpected 'Start Cutscene'"?

Read the BFAQ entry Placing code. That error most usually means you've placed a command outside a function - as such, AGS doesn't know when to run it, and so it's 'unexpected'. As Ali said, the 'First Time player enters room' interaction of the Room (not Global) script is probably the best place in this case.
I know what you're thinking ... Don't think that.

Sylvr

Thanks very much for your help thus far. The walking works.

Now, it says "undefined symbol: Man". Does that mean I need to define him before I tell him to walk?
| Ben304: "Peeing is a beautiful thing, Sylvr" |

Ashen

It sounds like you're using the Script name, rather than the Script-o-name (do a forum search for more details, this has come up several times since OO-scripting was introduced in V2.7).
Basically, if you're trying to move a character called 'Man', you need to use cMan.Walk. For objects, add a lowercase 'o' to the names (DOOR becomes oDoor, etc). The script-o-names for characters is displayed next to their script-anmes in the Character window of the Editor. (And you can check script-o-names for objects, inventory items, etc in the relevant bits of the editor, too.)
I know what you're thinking ... Don't think that.

Sylvr

my script says

StartCutscene (3);
cMan.Walk(189,219,eBlock);
character[Man].Say("My name is ego");
character[Man].Say("My name is ego");
character[Man].Say("My name is ego");
character[Man].Say("My name is ego");
character[Man].Say("My name is ego");
EndCutscene();

And that isn't what the 'man' will say. When I changed the [Man] to [cMan] it says "Type Mismatch: Cannot convert 'Character*' to'int'. Was it the cMan.Walk you were telling me to change?
| Ben304: "Peeing is a beautiful thing, Sylvr" |

Ali

I'm not certain this will help, but try using:

cMan.Say ("x");

Sylvr

| Ben304: "Peeing is a beautiful thing, Sylvr" |

Ashen

Yes, you can either use cMan or character[MAN] (or the character number, e.g. character[0]) but note that the capitalisation matters in AGS. 'Man' (which you're using) isn't the same as 'MAN' (which AGS expects). So, you could change character[Man] to character[MAN] or cMan and it would work.

You're really asking questions that've been answered MANY times before - in the manual, the BAFQ, and around the forums. Please, search and read through those in the future, before asking.
I know what you're thinking ... Don't think that.

Sylvr

I've searched, and I know that they've likely already been asked. Thank you for helping all the same. :)
| Ben304: "Peeing is a beautiful thing, Sylvr" |

SMF spam blocked by CleanTalk