[BUG?] RaceGhost_... functions weird behavior

Moderator: English Moderator

Post Reply
User avatar
Nerpson
Translator
Translator
Posts: 1554
Joined: 27 Sep 2013, 18:02
Location: France
Contact:

[BUG?] RaceGhost_... functions weird behavior

Post by Nerpson »

Hello,

I'm currently developing the TimeAttack mode for the Race campaign of TMOne Alpine². When working on the replay after finishing a race, I encountered various important issues, preventing me to finish the mode...
The functions prefixed by RaceGhost_ in the CTmMode context class have a strange behavior.

RaceGhost_RemoveAll() as well as RaceGhost_Remove(Ident) seems not to work, the replay already spawned are still on the map.
RaceGhost_AddWithOffset(Ident, Integer) is not a deterministic function. It does not produce the same result with the same arguments. The first time I use it, the replay is well spawned, the second time it's not.
Raceghost_IsReplayover(Ident) throws an error no matter what
Image

Thanks for your consideration
ImageImageImageImage
User avatar
Eole
Nadeo
Nadeo
Posts: 1265
Joined: 26 Apr 2011, 21:08

Re: [BUG?] RaceGhost_... functions weird behavior

Post by Eole »

The RaceGhost_AddXXX() functions all return an Ident. This Ident is different than the one of the Ghost you pass in parameter. All other RaceGhost_XXX() functions that take an Ident as parameter must use the Ident returned by RaceGhost_AddXXX() and not the Ghost.Id directly.
Contribute to the ManiaPlanet documentation on GitHub
A question about ManiaScript? Ask it here!
User avatar
Nerpson
Translator
Translator
Posts: 1554
Joined: 27 Sep 2013, 18:02
Location: France
Contact:

Re: [BUG?] RaceGhost_... functions weird behavior

Post by Nerpson »

Hello Eole,

Indeed, the documentation has GhostInstId written has parameter name, so I already tried with this Ident. In facts, I tried with both the returned Ident and the CGhost Ident already.

Edit: For RaceGhost_AddWithOffset(), I tried to spawn a lot of ghosts with various delay values, no car is spawned. So I guess it's a bug.

Code: Select all

for (I, 0, 100) {
	RaceGhost_AddWithOffset(ScoreMgr.Playground_GetPlayerGhost(Players[0]), I*1000); //< I also tried negative values
}
ImageImageImageImage
User avatar
Nerpson
Translator
Translator
Posts: 1554
Joined: 27 Sep 2013, 18:02
Location: France
Contact:

Re: [BUG?] RaceGhost_... functions weird behavior

Post by Nerpson »

New issue discovered: RaceGhost_Add(Ghost, True); is not deterministic as well. Sometimes work (ghost is transparent), sometimes not (nothing). When passing False, it works 100% of the tries. With True, you can cross your fingers.
ImageImageImageImage
User avatar
Nerpson
Translator
Translator
Posts: 1554
Joined: 27 Sep 2013, 18:02
Location: France
Contact:

Re: [BUG?] RaceGhost_... functions weird behavior

Post by Nerpson »

Another issue found: (2 pics, use arrows on the embed)


The avatar of the ghosts are messed up. It sometimes seems to keep the last ghost's avatar.
ImageImageImageImage
Post Reply

Return to “MP4.1 REPORTS / BUGS / INFORMATION”

Who is online

Users browsing this forum: No registered users and 1 guest