"Visible if not isTrackReverse" Wrong interpreted?

"Visible if not isTrackReverse" Wrong interpreted?

Postby Martin Ziegler » 08 May 2018, 12:06

Hello guys,

on my track I have got a problem:
Without any issue I can let objects only shown, when the track is driven in reverse.
But if I want to let objects only shown, when the track is NOT driven in reverse, it didn't work for me.
Do I do anything wrong?

My scrpting.as:
{l Code}: {l Select All Code}
bool isTrackReverse(Track::TrackObject@ obj)
{
    return Track::isReverse();
}


Greetings,
Martin
Attachments
Screenshot from 2018-05-08 12-12-45.jpg
Track In Reverse
Screenshot from 2018-05-08 12-13-35.jpg
Track Not In Reverse
ObjectInReverse.jpg
ObjectInReverse
ObjectNotInReverse.jpg
ObjectNotInReverse
Martin Ziegler
 
Posts: 3
Joined: 27 Dec 2015, 12:15

Re: "Visible if not isTrackReverse" Wrong interpreted?

Postby Mr.XX99 » 08 May 2018, 19:13

Hi,
I don't know if that works, but you could try this:

scrpting.as:
{l Code}: {l Select All Code}
bool isTrackForward(Track::TrackObject@ obj)
{
    return !Track::isReverse();
}

bool isTrackReverse(Track::TrackObject@ obj)
{
    return Track::isReverse();
}

and then use isTrackForward in "visible if"
Playing SuperTuxKart on my Windows 10 Laptop, my mobile phone and hopefully soon on my Anroid TV :)
(profile picture from John Tuggle URL: https://www.flickr.com/photos/22565768@N04/4454921691 License: https://creativecommons.org/licenses/by/2.0/ picture was edited by me)
User avatar
Mr.XX99
 
Posts: 33
Joined: 29 Dec 2017, 21:39
Location: Germany

Re: "Visible if not isTrackReverse" Wrong interpreted?

Postby Auria » 08 May 2018, 23:54

If you could attach the track (blend file and exported file please) to the forum, that would also help us diagnose a lot
Image
User avatar
Auria
STK Moderator
 
Posts: 2869
Joined: 07 Dec 2009, 03:52

Who is online

Users browsing this forum: No registered users and 1 guest