Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Messages - Baroni

Pages: [1] 2 3 ... 89
Hello Manuel,

of course - in the script, after it says "SpawnAtPos(tweenPath.PathGetPoint(perc));", you would just get a position further along the path e.g. using tweenPath.PathGetPoint(perc + 0.01f) and orient the object to that position.


But I cannot make it stay flat, when I drag it left or right the drawings from the LineRenderer rotate. How to make it stay flat?

that's something you could have found online, e.g. here, or in the official manual itself: try setting its 'Alignment' to 'Local'.

Also, how to make it so that player who join the room wait until max players are reached then every players in room spawn at same time in game scene?

You would be looking at the OnPhotonPlayerConnected method, NetworkManagerCustom script. In there, the RPC for adding the player is called directly, at the end. Instead, you would need to add a check for the current player count and if the desired player count has been reached, fire that RPC for all players.

Simple IAP System / Re: Any plans for Playmaker support?
« on: February 08, 2019, 11:12:14 am »
Totally fine to ask here ;)

No plans for PlayMaker support currently. Simple IAP System requires the basics of programming, as with billing, different events can happen at different points in your game. Adding PlayMaker FSMs/actions on top of that (and supporting them) would make the overall workflow more compliated than it actually was designed for.


it's a bit complicated to explain - the call to DBManager.isPurchased is accessing a different section on SIS' local database, than where the consumable entries are stored. So DBManager.isPurchased can only check for non-consumable products (which are saved in the 'Content' section).

Consumable entries are saved in the 'Player' section instead, which can be accessed by calling DBManager.GetPlayerData(string id). Note that you can actually store any data in 'Player' data, which is why this method returns a JSONNode. So when checking inventory amounts of a specific consumable product, you would do DBManager.GetPlayerData(string id).AsInt, returning the current product count.

Please check our scripting reference for more methods, i.e. returning all purchased products etc. In the editor, you can also see the current database content under Window > Simple IAP System > Show Database.

Simple IAP System / Re: error message 'usercancelled'
« on: February 04, 2019, 05:52:08 pm »

the error message is raised by Unity IAP.

You could implement a switch-case with your own error description in the IAPManager, OnPurchaseFailed(Product item, PurchaseFailureReason reason).

If you are trying to purchase a non consumable product on an account that owns it already, it will be restored since you cannot purchase non consumable products twice. The UI in SIS should prevent you from doing so by setting the product to "sold".

Regarding the IAPListener, make sure that the script is enabled on your IAPManager prefab.

And seeing the NullReference error you've posted, what is the actual workflow you are doing that causes the error? What are your settings (receipt validation?).

While I cannot provide code samples for the specific implementation you've requested, since that would be custom code that should be added by you, the base functionality is already there.

To summarize, you either have (1) a player-controlled aim indicator that moves on the ground, or (2) an aim indicator that is fixed to the player, but rotates with the turret. You need to define your aim indicator prefabs in the Player script, and instantiate them according to the selected bullet index. In addition, you need to re-map the joystick controls in the player script to your custom method that checks the current aim indicator and moves or rotates it.

A joystick, when moved, returns a Vector2 variable with the direction it is moved to (x/y axis from -1 to 1), similar to the arrow keys on desktop devices.

Both moving and rotating an object using a Vector2 variable as input is already demonstrated in the Player script:
(1) moving the player tank itself using the left joystick: void Move(Vector2 direction = default(Vector2))
(2) rotating the turret using the right joystick: void RotateTurret(Vector2 direction = default(Vector2))

By looking at these methods, you should be able to implement your own move/rotate aim indicator method processing a Vector2 as input. I'm sorry to not provide code, but this asset is meant as a tutorial/template after all. If you have general issues with programming, I would recommend checking out more beginner friendly tutorials either by Unity directly (they offer a lot of them) or searching for online resources that answer your specific coding questions.

Please do not contact us on multiple channels with the same question. Copy pasting from our email conversation:

You could try setting the "lookAhead" value in the movement script inspector to something very small to smooth it out, e.g. 0.02.

Otherwise if you would like to control the rotation in more detail, please check out the waypoint rotation example scene.

IAPManager.PurchaseProduct(string productid) is the correct method for initiating a purchase manually via code. It does not require any further UI interaction.

Please have a look at our scripting reference to see which other methods are publicly available.

Hello Div, welcome to the forum.

There is a "Local" path demo in the Advanced example scene, as well as a 2D sample.

Ticking the "local" checkbox on the movement script is the first step, but both the moving object and the path also need to be parented to the same game object. In this scenario the parent game object can be moved too, with the child object moving locally.

3D or 2D does not make a difference in this regard.

Simple IAP System / Re: Fetching IAP's Metadata
« on: January 26, 2019, 12:19:13 am »
If you wouldn't want the title or description to be set, you would leave the text component empty on the IAPItem component, on the shop item prefab.

Simple IAP System / Re: How to integrate in-game currency with Simple IAP
« on: January 22, 2019, 10:04:23 pm »
Could you post the script that shows how you're adding coins to a variable in game, which get picked up by the player? You must have some prefab with a collider/trigger doing that already?

Simple IAP System does not provide game related prefabs, as all games are unique. It offers the IAPManager and DBManager classes, which you can access at runtime, for querying purchases, currency amounts or player data. Just add the IAPManager prefab to your first scene and you're ready to go. You need to connect these classes with your game then (DBManager.IncreaseFunds), like I wrote before.

Really curious what you are doing, or any visual assistance (drawing / screenshots / existing scripts), since I don't quite understand what you are missing exactly.

Simple IAP System / Re: How to integrate in-game currency with Simple IAP
« on: January 22, 2019, 09:10:35 pm »
A tutorial for calling one method in a script? :o

Sorry, Simple IAP System requires at least basic Unity programming knowledge if you would like to integrate it into your scripts.

Simple IAP System / Re: How to integrate in-game currency with Simple IAP
« on: January 22, 2019, 08:02:59 pm »
Actually the same procedure applies in an infinite runner game as well. After the round is over in some way (player stopped or died) you would call DBManager.IncreaseFunds() of Simple IAP System with the amount of coins earned during that round.

You probably must have some kind of game over script, so you would add the method there.

Pages: [1] 2 3 ... 89