Official Core Basic Weapons Tutorial - Help needed!

Basic Weapons Tutorial

My implementation

Project

Problem #1:
When the game is published for public use:
The gun on the ground can be taken ONCE by a single player, after game publication.
If the gun is taken, it can´t be taken again in further plays, by the same or any other player.

When the game is played in Preview, while the project is opened in the CORE editor:
No such effect, all works fine.

When the game is played local, from the main menu "Create" of the CORE editor:
No such effect, all works fine.

How to fix that?


Problem #2:
Take the pistol on the ground, by F.

You see the bullet lying on the ground at x,y=0,0 , quite small and in horizontal orientation ( the bullet data in the project, before a template was generated )

Shoot.

Why do the bullets fly with vertical orientation ?
Why is the size of the flying bullet not taken from the setup values?

You see the bullet lying on the ground at x,y=0,0 , quite small and in horizontal orientation ( the bullet data in the project, before a template was generated ). This is disregarded for the flying bullet animation. How to fix that?

See screenshot

Problem 1: The gun needs to be placed inside a spawn trigger. You can download a ready-made spawner from community content called Universal Object Spawner. You can then set the timer for how soon the gun comes back after someone takes it.

Problem 2: Try placing the bullet, set to the proper size and orientation, into a template. That might fix it. Maybe.

Thanks for advice.

#1
Update of the published game & the GitHub repository:

The FIRST gun on the ground can (still) be taken ONCE by a single player, after game publication.
If the gun is taken, it can´t be taken again in further plays, by the same or any other player.
But I followed the instructions of the tutorial
The PROBLEM is, that the weapon is not available with NEXT GAME, if once taken.
Is this a bug?

The SECOND gun provided by UniversalObjectSpawner - with visible cylinder -, can be taken by by all players, one after the other. So it is always available for the players. Thanks for pointing me to this. Thats ok, but it is a Community-Contents object with complex script!

#2
The bullet is, according to the tutorial instructions, already a template, and imported into the weapon as "Projectile Template". So same effect with both guns.

Any other ideas, feedback?

Sincerely
Rolf

With the gun on the ground, are you placing the gun object itself down as well as the spawner or just relying on the spawner to provide it? Anything collectible placed down directly will only be obtainable a single time. If this is the case, just rely on the spawner to provide the item. You can toggle off visibility on that cylinder if you don't want it displayed.

With the bullet template, can you dump the template temporarily into the hierarchy and edit the orientation? I'm not sure why a provided template is being screwy like that so I'm really just guessing.

#1
I understand that I am still confused about the living time of a game.

I know from playing CORE games, that if I come back, I return into the same state as I left. This would explain why a "taken" object is not there.
But I assumed so far, that this "memory" depends on further programming effort.

On the other hand, if I play an online game, I expect that I get the SAME FRESH game, as anybody else. And not that former players might have modified the game environment/ game scene...

Especially the difference in behaviour ( simulation, local play versus online play ) is not satisfying. And I followed the instructions of an official tutorial....

#2
Indeed, if I copy the Bullet template into the project, the Scale x,y,z = 0.1, 0.1, 0.1 is preserved, but the rotation is deleted, i.e.

Original:


ClientContext
Bullet(Client)
Scale x,y,z = 0.1, 0.1, 0.1
Rotation = -90

Template, reimported into the project:


Bullet
Scale x,y,z = 0.1, 0.1, 0.1
Rotation = 0

So this might explain the wrong orientation, but not the wrong size...

A solution for problem #1 is presented at

Advanced Scripting in Core

https://docs.coregames.com/tutorials/lua_basics_manticoin/

Reset

Lastly, let's add in the logic to reset the map (as in to add the coins back) after they all have been >picked up.
Currently we are deleting the coins when they are picked up. We could spawn in new coins at the old >locations, but that would involve storing references to the old locations. Sometimes you need to >rewrite code as your game changes, and that's exactly what we're going to do here!
An easier solution would be to just hide the coins from the map when they are picked up, and then
un-hide them when resetting the map. Fortunately, this is not only a simple thing to do in Core, but
also a very quick change.