Hey all,
Trying to make a skill game based on wheelieing as far as you can, and I want the score to be the distance you have wheelied, so when you put your front wheel down, the distance counter stops increasing, but when you are wheelieing again, it counts the distance again.
I've spent about an hour just trying to get the scoring to work, and I can't get anywhere close.
What I think I want to do is have a collision event between the ground and the front wheel that when active deactivates a distance counter, that then subtracts from the overall distance. However, Certain data sources don't allow me to use in-game values when they are what I think I need to do this.
I do want to figure this out on my own, as that's the best way to learn these things, but I'm sending myself round in circles looking at all the options.
On the plus side, I have got the event to end when bail or crash, but that's relatively easy.
EDIT: Just found pick value object, so that may well solve things.
Use hit trigger which detects a hit between the front wheel and everything else.
That's fine. Already there with that. Was having problems with data sources and operators in terms of the actual scoring method, but had a breakthrough now.Originally Posted by pahapertti
Will post back if I need more assistance.
Right, I'm getting close but actual methodology is losing me.
Have a hit trigger set between front wheel alone, and the ground, have tested and is working fine. I've also got a driving line distance operator.
When the front wheel leaves the ground (ignoring back wheel not being on the ground at the mo, even though that isn't a wheelie) The hit trigger will be inactive. Then I need to impulse to an event that will draw the current driving line distance, and remove that from where the driving line distance gets to. That would work for one wheelie alone though.
Gah! Even that isn't working. I know what I want to do, but I just can't get my head round it.
Such a complex thing you chose for one of your first tracks!
Didn't seem so complex when i thought of it! I at least wanted to have a go at something using data sources, triggers etc. and I can see so much to do with it, but just that finesse to actually pull it off is hard.Originally Posted by Oski
I haven't set up a single obstacle etc. just trying to get that scoring mechanism in is all I want, but I may well leave it for a bit and do more simple stuff with operators events etc. to get used to it.
I like the idea: a track where you don't lose the wheel by touching the ground, you simply don't accumulate points when you're not "in wheelie position".
This is kinda complex. Here is some pseudocode to describe how I might do it (using the code tag so indenting works):
[code:41ayfqho]
NewDistance = CurrentDrivelinePosition - SavedDistance
(calculates how much we've traveled since the last tic)
(NewDistance and SavedDistance are Game Variable Data Sources)
(CurrentDriveLinePosition is a Distance Operator between bike/rider and start)
If FrontWheelOnGround = False AND BackWheelOnGround = True
(these are continuous hit triggers that feed into Filters)
MyScore = MyScore + NewDistance
(MyScore is a Game Variable Data Source)
SavedDistance = CurrentDrivelinePosition
(saves this for use during the next clock tic)[/code:41ayfqho]
Hope that makes some sense. A couple other concerns:
You'll also have to figure out some way to prevent the score from accumulating if you back up and re-cover the same ground. My pseudo-code above would allow you to get a higher score by going back and forth over the same ground.
Ah, that makes a load of sense. I think this game is going to make me need to write things down!Originally Posted by MegaTrain
The distance meters in SPHERE don't go down or up if you go backwards, so I'll look there for some inspiration.
Not going to work on it more now, as I really have spent far too long on it for my head to be OK.
I'm so close, but so far.Originally Posted by MegaTrain
Got the wheelie logic gate built (needs refinement for endos)
Got the increase in distance per tick built.
Struggling to get an increase set event to actually increase a variable event (which would be MY SCORE)
Just going to map this out and see if someone (RL) can work out where it's going wrong, and what I should use instead. What I know is working, I'm going to leave out.
Value: difference in distance since last tick
|
|
Set: Increase by (Value)<----When True------- Generic Filter (Equals
|
|
MYSCORE (User set variable data source) (Attempting to be set to increase by set)
Now, I've also set up the set with an impulse filter, and it's not increasing, but in the same chain, another one works fine. I really don't know why it's not working.
That's the image of what's going on. The last variable on the right won't update.