Wrestling game help needed

Another quick question.

If you want to add 2 or 3 stats together, do you need to create a new stat or can you just code something like

*if ability + power > 6.5

or do you have to do something like excel

if 6.5>=sum{ability + power}

The second version works (the first doesn’t work as I’ve tried doing so before; if it works, please let me know) as far as I know.

I’m getting an error message with that Alex

Invalid expression, couldn’t extract another token: [stamina+power]

Lol, you don’t “literally” do that, you do the following:

*set sum ability
*set sum + power
*if 6.5 >= sum
    .
    .
    .

Aha, got it now

Cheers

@AKNel1

Kayfabe is an industry term. In the old time promotions, kayfabe was very important. For example, Faces and heels had to pretend to dislike each other outside the ring to keep up the illusion that wrestling is a legit sport and not predetermined, scripted entertainment. Basically what I’m asking is, will you write your story as a legit sport or not? lol.

If you would like to know anything, drop me a PM, I’d be happy to share more with you. :slight_smile:

Actually its a wrestling term meaning made up for a storyline, example: kane and the undertaker are kayfabe brothers.

Oh OK, I’d never heard that expression. It will be a fairly ‘legit’ look at everything focusing mainly on in ring action. In the latter stages there will be some ‘trash talking’. If I get to a sequel then I might look further into creating rivalries, heel/face & trash talk.

Your initial stats (power, strength, speed, guile, ability & stamina) are user defined based on age, height & weight. These will improve during the game depending on choices you make, despite this the fights will become progressively harder to win. So, the initial match will be a ‘squash’ match. The first match in the tournament will be against a ‘jobber’. The Semi Final will be against either a guy making his way or one on the way down with the final being against one of the stars of the Federation.

Next problem

You don’t have time to dawdle, what are you going to do now…
*choice
#Bear Hug
‘’ *set sum ability
‘’ *set sum + power
‘’ *if sum > 6.5
‘’ *set win_points +1
‘’ Flicker runs straight at you. You immediately throw your arms around him & lock your hands tight. You lift him off the floor & squeeze him tightly. You can’t hold it for a long time but the juice is sapping out of him.
‘’ *finish
‘’ *elseif sum < 6.5
‘’ He’s just too quick to enable you to catch him, as you chase him around the ring he laughs at you.
‘’ *finish

Using ’ to show indents.

It seems to accept the code fine (no error reported). However the ‘script’ does not show & the game gets ‘stuck’

*choice
    #Bear Hug
        *set sum ability
        *set sum + power
        *if sum > 6.5
            *set win_points + 1
            Flicker runs straight at you. You immediately throw your arms around him & lock your hands tight. You lift him off the floor & squeeze him tightly. You can't hold it for a long time but the juice is sapping out of him.
            *finish
        *elseif sum < 6.5
            He's just too quick to enable you to catch him, as you chase him around the ring he laughs at you.
            *finish

Here’s how you do it. But also note that you need to add another *elseif in case sum = 6.5 (or just modify one of them to >= or <=). Here are some tips on indentation:

win_points can only be a full number

Thanks again, Alex

Your help is invaluable (*)

Not a problem :slight_smile:

It’s still not having it Alex :-S

Does sum need to be listed as a stat in the mygame & choicescript_stat files

you either write a line in your current scene:

*temp sum

So that “sum” is a temporary variable, that only stays within that scene and that dissapears the moment the scenes are switched, or you declare it in mygame.js (like the other stats).

choicescript_stats.txt is a file that is only used for displaying certain variables; you don’t HAVE to add all the stats you make there. You only add the stats you want the player to see once he presses the “Show Stats” button.

That’s cracked it.

Thanks again.

OK moving on. A slightly more complex problem this time. Again not getting any error messages. The initial choices show up fine, the sum works fine (win_points is adjusted in the stats)

Here’s where I hit the problem, the ‘script’ doesn’t show up & there is no ‘next chapter’ button when I test the game.

(again using ’ to show indents)

*temp sum
No time to waste. Which of your finishing moves are you going to use

*choice
#Running Power slam
‘’ *set sum strength + power + ability
‘’ *if sum >= 7.5
‘’’ *set win_points +1
‘’’ Flicker charges at you, but you telegraph his move & grab him around the torso. You lift him off his feet & slam him to the canvas. You immediately dive on him, hook the leg & the Ref starts counting …1…2…
‘’’ *goto_scene Contract signing
‘’ *else sum <= 7.5
‘’’ *set win_points -1
‘’’ Too slow, Flicker catches you off guard with a forearm smash, follows it up with a knee to the gut & as you drop to your knees he bounces off the ropes and drop kicks you in the side of the head. Ooof, your on the canvas …1 is that the Ref counting …2 I’m pretty sure it is …
‘’’ *if win_points >= 5
‘’’ In the nick of time, you kick out.
‘’’’ *goto_scene Flicker fight four
‘’’ *else win_points < 5
‘’’’ *goto_scene death

The options continue down the page (8 in total). As always any help is gratefully received.

*temp sum 
No time to waste. Which of your finishing moves are you going to use?
*choice 
    #Running Power slam 
        *set sum strength
        *set sum + power
        *set sum + ability 
        *if sum >= 7.5 
            *set win_points + 1 
            Flicker charges at you, but you telegraph his move & grab him around the torso. You lift him off his feet & slam him to the canvas. You immediately dive on him, hook the leg & the Ref starts counting ....1....2.. 
            *goto_scene Contract_signing 
        *elseif sum <= 7.5

            *set win_points - 1 
            Too slow, Flicker catches you off guard with a forearm smash, follows it up with a knee to the gut & as you drop to your knees he bounces off the ropes and drop kicks you in the side of the head. Ooof, your on the canvas ....1 is that the Ref counting ....2 I'm pretty sure it is .. 
            *if win_points >= 5 
                In the nick of time, you kick out. 
                *goto_scene Flicker_fight_four 
            *elseif win_points < 5 
                *goto_scene death

Try this code, it should be working. You can’t add a condition to an *else (therefore either make it an *elseif, an *if, or just remove the condition). Also, don’t make ANY spaces in scene/label names. You may use underline though.

EDIT: Not sure why, but at the end of the first *elseif line, there’s a < br/> line; ignore that, it’s not supposed to be there (and it doesn’t show up when I edit my comment).

@AKNel1 Okay, two things to say, and one question:

  1. Use `
` before your code and `

` after it to retain spaces when you copy it into the forums.

  1. I’d actually recommend taking a look at Wrestling Spirit 2 (http://www.greydogsoftware.com/ws2/) for some ideas if you’re thinking about an actual wrestling system. (I’d actually recommend all the stuff from GDS, Extreme Warfare, the predecessor to TEW is what turned me into a bit of a smark.)

Q) Is this going to be in or out of kayfabe? Or, to ask that another way, are you going to play as the wrestler (e.g. Mark Calaway), or the wrestling character (e.g. The Undertaker)?

@AlexCosarca They’re called underscores.

@Reaperoa, yes, underscores. I haven’t used that word for so long that I forgot its existance. Thanks for the heads-up :slight_smile:

Thanks again Alex, removing the final set of conditions & putting them in a new file (redirect) solved the problem.

I’m now going to check it works in all 3 possible outcomes.

Can I just point out that

goto_scene file name

works fine with a space

although I will name all my files with just one word now to avoid any possible conflict.

@Reaperoa -

re: 1 - will do, thanks for the heads up

re: 2 - I’ve just had a quick look, my game will scratch the surface of the depth involved there - but it will also scratch the surface with regards to cost & amount of people working on the project :-)) I don’t want to get too caught up in other sims at the moment, I want to get my demo up & working & see what people make of it

re: Q - I think it allows the possibilities to do either - you’ll get a better idea when you see the demo. The story is fairly linear but you can go off on tangent’s