expected ':' not found.

Discuss how to use the Ren'Py engine to create visual novels and story-based games. New releases are announced in this section.
Forum rules
This is the right place for Ren'Py help. Please ask one question per thread, use a descriptive subject like 'NotFound error in option.rpy' , and include all the relevant information - especially any relevant code and traceback messages. Use the code tag to format scripts.
Message
Author
philip92dk
Newbie
Posts: 11
Joined: Tue Nov 30, 2010 8:45 am
Contact:

Re: expected ':' not found.

#16 Post by philip92dk »

yaa it Works now lol how do rename bob?

Jake
Support Hero
Posts: 3826
Joined: Sat Jun 17, 2006 7:28 pm
Contact:

Re: expected ':' not found.

#17 Post by Jake »

philip92dk wrote:yaa it Works now lol how do rename bob?
If you look at the active-demo.rpy file, it has comments (lines beginning with a '#') which walk you through the basic information you need to set up the most simple of battles - it covers the fighter's name in a bit of code that looks a bit like this:

Code: Select all

        # Next, we create Bob as a player fighter - meaning he'll be controlled by the player, who'll get to choose his moves.
        # the first parameter is the fighter's name, and the 'sprite' parameter gives the sprite to use for that character;
        # all other params, with names, are used for Bob's stats.
        # If you don't include a particular stat in the list, then if Bob needs it to use a skill or something, it'll be added automatically
        # with a reasonable default, so you only actually have to define the non-default stats.
        # (Bob is a bit of a brawler, good at hand-to-hand combat but not so fast.)
        bob = PlayerFighter("Bob", Speed=11, Attack=20, Defence=20, sprite=bobSprite) 
- whenever you create a fighter, either with 'PlayerFighter' or 'SimpleAIFighter' or whatever, you do it basically like that. So to change the name, just change the "Bob" directly after 'PlayerFighter' to "Clive" or "Duncan" or whatever you prefer, and that's what he'll appear as in-game.


I kind of forgot it when you asked before, but the nearest thing there is to a tutorial at the moment is the comments in those files - they're expected to be read in roughly this order:

active_demo.rpy
equipment_demo.rpy
grid_demo.rpy
path_demo.rpy
facing_demo.rpy
scroll_demo.rpy
hex_demo.rpy
skills_demo.rpy
Server error: user 'Jake' not found

philip92dk
Newbie
Posts: 11
Joined: Tue Nov 30, 2010 8:45 am
Contact:

Re: expected ':' not found.

#18 Post by philip92dk »

ok thanks

Post Reply

Who is online

Users browsing this forum: No registered users