Object Throwers

Post suggestions regarding RVGL.
User avatar
Kiwi
Posts: 526
Joined: Thu Dec 07, 2017 9:04 pm

Object Throwers

Unread post by Kiwi » Tue Dec 31, 2019 10:01 am

In the 19.1230a RVGL release it's possible to trigger custom Animations at a specific lap, by using the Flag High configuration.

Flag high: Trigger in lap (0 = any lap, -1 = last lap, n = nth lap)

It would be nice, if this could be also done for Object thrower triggers. At the moment, the triggers will activate the Object thrower at the first passing.

Example: This trigger could let a basketball throw at lap 2.

Image

In addition, it would bring a lot of new possibilities, if more objects could be thrown by an Object thrower. At the moment it's only possible to throw for example basketballs, footballs, packets, and so on. Would it be possible to throw also objects like rain, lightning, 3d sounds, and more?

It's already possible to choose this obejcts at the Object thrower object, but when testing either nothing will be thrown, or RVGL crashes as soon the trigger will be passed.

Image

As an example this would bring the possibility, that there is no rain at the beginning of the track, but after leaving a long tunnel section rain is starting.
My Re-Volt creations: Skins | Cars | Tracks | Marvle
User avatar
607
Posts: 308
Joined: Thu Dec 07, 2017 5:49 pm

Re: Object Throwers

Unread post by 607 » Tue Dec 31, 2019 10:21 am

I can't say a lot on this, but Huki said recently that objects that require flags cannot be thrown.
User avatar
Huki
Developer
Posts: 307
Joined: Wed Dec 06, 2017 5:54 am
Discord: Huki#1668

Re: Object Throwers

Unread post by Huki » Tue Dec 31, 2019 3:04 pm

Kiwi wrote:
Tue Dec 31, 2019 10:01 am
In the 19.1230a RVGL release it's possible to trigger custom Animations at a specific lap, by using the Flag High configuration.

Flag high: Trigger in lap (0 = any lap, -1 = last lap, n = nth lap)

It would be nice, if this could be also done for Object thrower triggers.
This is a good idea and it can be done, yes.
Kiwi wrote:
Tue Dec 31, 2019 10:01 am
In addition, it would bring a lot of new possibilities, if more objects could be thrown by an Object thrower. At the moment it's only possible to throw for example basketballs, footballs, packets, and so on. Would it be possible to throw also objects like rain, lightning, 3d sounds, and more?
Objects that require flags cannot possibly be thrown (as 607 mentioned). This means you can't throw stuff like 3dSound. Rain doesn't require flags, so it should work. Does it not?
User avatar
Kiwi
Posts: 526
Joined: Thu Dec 07, 2017 9:04 pm

Re: Object Throwers

Unread post by Kiwi » Tue Dec 31, 2019 3:13 pm

I just tried it again. Rain is working. I am pretty surprised, cause I can remember I tried this before, and it didn't worked. Also Lightning is working. This is great. Too bad 3dSounds can't be thrown, because this means I can add rain, but no rain sound. But as long it's only "light" rain, it's not that big issue.

Additonal question: Is the rain visible for all players in a multiplayer race?
My Re-Volt creations: Skins | Cars | Tracks | Marvle
User avatar
Huki
Developer
Posts: 307
Joined: Wed Dec 06, 2017 5:54 am
Discord: Huki#1668

Re: Object Throwers

Unread post by Huki » Tue Dec 31, 2019 3:20 pm

Kiwi wrote:
Tue Dec 31, 2019 3:13 pm
Too bad 3dSounds can't be thrown, because this means I can add rain, but no rain sound.
Unless we can find a way to specify flags for the thrown object, it can't be done unfortunately.
Kiwi wrote:
Tue Dec 31, 2019 3:13 pm
Additonal question: Is the rain visible for all players in a multiplayer race?
Let's see... an object thrower is triggered by (any) player's car, so I believe rain will appear on a player's screen only when any car has hit the trigger on that player's screen.

In case of moving objects like basketball, it can happen that the thrower is triggered on player A's computer but not for player B. In this case, the basketball will exist for player A but not for player B. However, once player B has also triggered the thrower, and caused the basketball to be thrown, the ball's position is synchronized for both players.
User avatar
Kiwi
Posts: 526
Joined: Thu Dec 07, 2017 9:04 pm

Re: Object Throwers

Unread post by Kiwi » Tue Dec 31, 2019 3:36 pm

Huki wrote:
Tue Dec 31, 2019 3:20 pm
Let's see... an object thrower is triggered by (any) player's car, so I believe rain will appear on a player's screen only when any car has hit the trigger on that player's screen.
That's good. Because if I place the object thrower trigger that way, that the rain start before leaving a tunnel, it could happen, that other players are not inside the tunnel yet, and the rain start immediately, which would look strange for this players. This way the rain starts for every player at the same position.
Huki wrote:
Tue Dec 31, 2019 3:20 pm
In case of moving objects like basketball, it can happen that the thrower is triggered on player A's computer but not for player B. In this case, the basketball will exist for player A but not for player B. However, once player B has also triggered the thrower, and caused the basketball to be thrown, the ball's position is synchronized for both players.
This also means, if 2 players are in front with a 10m gap such situation could happen: Player A activate the trigger and will be hit by a basketball. But for Player B who is slightly behind it will look like player A was hit "by nothing", and Player B eventually will be hit by the same basketball again, as soon he activate the trigger himself?

I also have another question:

When I try to throw an item via an Object thrower (For example a star), RVGL crashes. Is this also caused by the "flag" problem?

For stuntarenas it would be really cool, if for example a trigger has to be activated, before a specific star spawn. This way it would be possible to design little puzzles to solve. Especially in combination with custom animations I would have a lot of ideas. This way whole storys could be designed.
My Re-Volt creations: Skins | Cars | Tracks | Marvle
User avatar
Huki
Developer
Posts: 307
Joined: Wed Dec 06, 2017 5:54 am
Discord: Huki#1668

Re: Object Throwers

Unread post by Huki » Tue Dec 31, 2019 3:59 pm

Kiwi wrote:
Tue Dec 31, 2019 3:36 pm
This also means, if 2 players are in front with a 10m gap such situation could happen: Player A activate the trigger and will be hit by a basketball. But for Player B who is slightly behind it will look like player A was hit "by nothing", and Player B eventually will be hit by the same basketball again, as soon he activate the trigger himself?
This is possible. But eventually, all players will sync their basketball position with that of the host (assuming host has already triggered his basketball).
Kiwi wrote:
Tue Dec 31, 2019 3:36 pm
When I try to throw an item via an Object thrower (For example a star), RVGL crashes. Is this also caused by the "flag" problem?
Yes it's the flag problem, but this has given me a very simple idea (and it's strange I hadn't thought of it before). We can simply initialize the thrown objects with zero for all flags. Many objects that use flags should work nicely with this.

For example, the star uses a single flag which specifies whether it's a practice star or not. With the above solution, it allows you to throw any star except a practice star, which is more than enough. Throwing a 3dSound will, instead of crashing, always play birds1.wav.
User avatar
Kiwi
Posts: 526
Joined: Thu Dec 07, 2017 9:04 pm

Re: Object Throwers

Unread post by Kiwi » Tue Dec 31, 2019 4:20 pm

Huki wrote:
Tue Dec 31, 2019 3:59 pm
Yes it's the flag problem, but this has given me a very simple idea (and it's strange I hadn't thought of it before). We can simply initialize the thrown objects with zero for all flags. Many objects that use flags should work nicely with this.

For example, the star uses a single flag which specifies whether it's a practice star or not. With the above solution, it allows you to throw any star except a practice star, which is more than enough. Throwing a 3dSound will, instead of crashing, always play birds1.wav.
This already sounds very good. I'm sure you already have thought more about it - and maybe it's more complicated, than I'm thinking. But would it be not possible to rebuild the Object thrower that way, so also the flag could be configured, as an additional option?

Like this...

Image

This way we could for example decide if the star thrown is a Global weapon star (0), or a practice star (1).
Because for Stunt-Arenas (Like Beehive Valley Adventurs) Practice stars have to be placed.

Same could be done for the 3d-sounds then. 0 for birds1.wav, 1 for birds2.wav, and so on.

This way also whole quests could be implemented. At a stunt arena I could for example let a waterbaloon item spawn, after activating a trigger. With this baloon then you can try to shoot down a packet.m object from a nearby platform, which is needed to fulfill a quest. ("Collect 10 packets", for example).

Also, we could do special tracks for online-sessions, where only (for example) shockwave items spawn, after triggers will be activated.
My Re-Volt creations: Skins | Cars | Tracks | Marvle
User avatar
Huki
Developer
Posts: 307
Joined: Wed Dec 06, 2017 5:54 am
Discord: Huki#1668

Re: Object Throwers

Unread post by Huki » Tue Dec 31, 2019 4:34 pm

Kiwi wrote:
Tue Dec 31, 2019 4:20 pm
This already sounds very good. I'm sure you already have thought more about it - and maybe it's more complicated, than I'm thinking. But would it be not possible to rebuild the Object thrower that way, so also the flag could be configured, as an additional option?
Every object supports up to 4 flags. All 4 flags of the object thrower are already used. This means there is no way to specify the thrown object's 4 flags. (Note that not all objects use all 4 flags, the star for example only uses one flag.)

There is one solution: the object thrower's ReUse flag is not used by the game. We can reuse it (hehe...) to specify at least one of the thrown object's flags. What do you think about this?

Kiwi wrote:
Tue Dec 31, 2019 4:20 pm
Because for Stunt-Arenas (Like Beehive Valley Adventurs) Practice stars have to be placed.
Are you sure? Stunt Arena simply enables every star in the level. You don't need to flag it as a practice star. Can you confirm this?
User avatar
Kiwi
Posts: 526
Joined: Thu Dec 07, 2017 9:04 pm

Re: Object Throwers

Unread post by Kiwi » Tue Dec 31, 2019 5:25 pm

Huki wrote:
Tue Dec 31, 2019 4:34 pm
There is one solution: the object thrower's ReUse flag is not used by the game. We can reuse it (hehe...) to specify at least one of the thrown object's flags. What do you think about this?
Does this mean, that for an 3d-sound it would be not possible, because beside the sound itself, also (for example) the range has to be defined? If so, I think I know what you mean.

I can confirm that the reuse flag is not working. If it's set to "Yes", the object will be only thrown once. This means there is a 100% chance it won't be used from any custom level, right?

I am just not sure for what exactly you would reuse the "Reuse" flag. For example, only for the star, to decide if it's a practice star or a global weapon star?
Huki wrote:
Tue Dec 31, 2019 4:34 pm
Stunt Arena simply enables every star in the level. You don't need to flag it as a practice star. Can you confirm this?
I've tested it, and I can confirm this. I don't know, why I have flagged them as Practice Stars then... :?
My Re-Volt creations: Skins | Cars | Tracks | Marvle
User avatar
Huki
Developer
Posts: 307
Joined: Wed Dec 06, 2017 5:54 am
Discord: Huki#1668

Re: Object Throwers

Unread post by Huki » Tue Dec 31, 2019 6:22 pm

Kiwi wrote:
Tue Dec 31, 2019 5:25 pm
I am just not sure for what exactly you would reuse the "Reuse" flag. For example, only for the star, to decide if it's a practice star or a global weapon star?
As I said, each object supports up to 4 flags (let's call them flag1, flag2, flag3 and flag4), and each of them can take any integer value. For the object thrower, ReUse is flag4. We can pass this as flag1 of the thrown object. How the thrown object utilizes its flag1 depends, of course, on the thrown object. For 3dSound, it is the sound to be played; for Star, it is used to decide whether the star is enabled in Practice mode; and so on.

I think maybe you're confused because ReUse takes a Yes or No value? This, and the name of the flag, can be changed. So "ReUse = Yes/No", can be changed to "Object Flag = 0-1000".

Kiwi wrote:
Tue Dec 31, 2019 5:25 pm
Does this mean, that for an 3d-sound it would be not possible, because beside the sound itself, also (for example) the range has to be defined?
It means you can select the sound but not the range and other parameters, which will be zero. So the sound will loop continuously and be audible everywhere (an ambient sound).

Anyway, I've thought about this again and I'm not really in favour of the ReUse solution, because it will be only a while before track makers find that it's not enough. In the long term it's better to find a more complete solution.

For now I've decided to simply initialize objects with all 4 flags zero. With this, you can already throw stars in your stunt arena mode, or an ambient 3dSound playing birds1.wav, and many other things.
User avatar
Kiwi
Posts: 526
Joined: Thu Dec 07, 2017 9:04 pm

Re: Object Throwers

Unread post by Kiwi » Wed Jan 01, 2020 1:16 pm

Thanks for the detailed description, this helped a lot.
The "for now" solutions sounds fine to me, a lot of things can be done then already, which are not possible at the moment.
My Re-Volt creations: Skins | Cars | Tracks | Marvle
User avatar
607
Posts: 308
Joined: Thu Dec 07, 2017 5:49 pm

Re: Object Throwers

Unread post by 607 » Wed Jan 01, 2020 2:48 pm

Very interesting discussion!
User avatar
Kiwi
Posts: 526
Joined: Thu Dec 07, 2017 9:04 pm

Re: Object Throwers

Unread post by Kiwi » Mon Apr 20, 2020 11:43 am

Huki wrote:
Tue Dec 31, 2019 6:22 pm
It means you can select the sound but not the range and other parameters, which will be zero. So the sound will loop continuously and be audible everywhere (an ambient sound).

[...]

For now I've decided to simply initialize objects with all 4 flags zero. With this, you can already throw stars in your stunt arena mode, or an ambient 3dSound playing birds1.wav, and many other things.
Hello Huki,

I've tried to use this new possibility at my new project. But I am not able to throw a 3d sound object. The sound won't be played after the trigger was activated. If I place the birds1.wav sound as a standaline 3d-sound object, it's working. The object thrower itself also work, cause I can throw other items, like the lightning or rain object for example.

Any idea, why this is not working?
My Re-Volt creations: Skins | Cars | Tracks | Marvle
User avatar
revolting1
Posts: 54
Joined: Sun Mar 29, 2020 11:36 pm
Contact:

Re: Object Throwers

Unread post by revolting1 » Tue Apr 28, 2020 8:10 am

Probably you already reach the present limits, could you try deactivating one and see if that works to activate the object thrower that's not working
Post Reply