playMaker

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.


Topics - heavygunner

Pages: [1] 2 3 ... 9
1
PlayMaker Help / Cinemachine TPS Camera
« on: March 19, 2021, 04:53:56 PM »
Hi,
Using cinemachine for first time. I want to a TPS camera. I added Cinemachine Freelook camera and adjusted few settings. It is not giving what I want. What I want is, maintain same distance between camera and target always.

Pls check this. I added what I want and what i got.
I'd appreciate if someone shared the settings.


Thanks ;)

2
PlayMaker Help / Falling front & falling back
« on: March 17, 2021, 03:20:10 PM »
hi,

i have a player. if obstacle hit him on back, he should fall front.
if obstacle hit him on front, he should fall back.

i have both animations. not sure how to do it perfectly.

Thanks

3
Hi,

Platform : WebGL

There is an Werbgl ad network which as only single .cs file. I imported that into Assets folder. I got below errors.

Quote
Assets\applixir.unity.cs(11,6): error CS0246: The type or namespace name 'MonoPInvokeCallbackAttribute' could not be found (are you missing a using directive or an assembly reference?)
Quote
Assets\applixir.unity.cs(11,6): error CS0246: The type or namespace name 'MonoPInvokeCallback' could not be found (are you missing a using directive or an assembly reference?)

Here is the code of that .cs file.

Code: [Select]
using System;
using System.Runtime.InteropServices;
using UnityEngine;

public class ApplixirWebGL
{
    public delegate void SimpleCallback(int val);
    [DllImport("__Internal")]
    public static extern void ShowVideo(int devId, int gameId, int
    zoneId, SimpleCallback onCompleted);
    [MonoPInvokeCallback(typeof(SimpleCallback))]
    private static void ApplixirEventHandler(int result)
    {
        Debug.Log("GOT VIDEO RESULT CALLBACK: " + result);
        PlayVideoResult pvr = PlayVideoResult.ADS_UNAVAILABLE;
        switch (result)
        {
            case 1:
                pvr = PlayVideoResult.AD_WATCHED;
                break;
            case 2:
                pvr = PlayVideoResult.NETWORK_ERROR;
                break;
            case 3:
                pvr = PlayVideoResult.AD_BLOCKER;
                break;
            case 4:
                pvr = PlayVideoResult.AD_INTERRUPTED;
                break;
            case 5:
                pvr = PlayVideoResult.ADS_UNAVAILABLE;
                break;
            case 6:
                pvr = PlayVideoResult.FB_WATCHED;
                break;
            case 7:
                pvr = PlayVideoResult.CORS_ERROR;
                break;
            case 8:
                pvr = PlayVideoResult.NO_ZONEID;
                break;
            case 9:
                pvr = PlayVideoResult.AD_STARTED;
                break;
            case 10:
                pvr = PlayVideoResult.FB_STARTED;
                break;
            case 11:
                pvr = PlayVideoResult.SYS_CLOSING;
                break;
            case 12:
                pvr = PlayVideoResult.AD_INITREADY;
                break;
            default:
                pvr = PlayVideoResult.ADS_UNAVAILABLE;
                break;
        }
        if (callback != null)
        {
            callback(pvr);
            callback = null;
        }
    }
    public enum PlayVideoResult
    {
        AD_WATCHED, // an ad was presented and completed successfully
        NETWORK_ERROR, // no connectivity available or other fatal network error
        AD_BLOCKER, // an ad blocker was detected
        AD_INTERRUPTED, // ad was ended prior to 5 seconds (abnormal end)
        ADS_UNAVAILABLE, // no ads were returned to the player from the ad servers
        FB_WATCHED,    // a fallback was presented successfully in response to ads-unavailable.
                       //  Will only occur if "fallback: 1" is set in the options.
        CORS_ERROR, // A CORS error was returned
        NO_ZONEID,  // There is no zoneId in the options
        AD_STARTED, // A video ad has been started
        FB_STARTED, // A fallback ad has been started
        SYS_CLOSING, // The system has completed all processes and is closing
        AD_INITREADY // The preload process has completed
    }
    private static Action<PlayVideoResult> callback = null;
    /// <summary>
    /// Calls out to the applixir service to show a video ad.
    ///
    /// Result is returned via the resultListerens event.
    ///
    /// </summary>
    ///
    public static void PlayVideo(Action<PlayVideoResult> callback)
    {
        ApplixirWebGL.callback = callback;
        ShowVideo(devId, gameId, zoneId, ApplixirEventHandler);
    }
    private static int devId;
    private static int gameId;
    private static int zoneId;
    // optional custom1 and custom2 are for use of game data like player ID and reward data
    // These must be setup and initialized as required by each game length limited by browser parms
    // private static string custom1; // character array or string value for game/player data
    // private static string custom2; // character array or string value for game/player data
    // private static bool dMode; // dMode determines if MD5 hash is useed server to server
    // private static bool prebid;  // enables the prebid system (contact us to enable prebid)
    // private static string pb_sec; // e.g. "facebook";
    // private static string pb_key; // e.g. "solitaire";
    // private static bool fallback;
    // private static string vSize; // "640x360" (default) or "640x480"
    // private static string vpos; // "top", "middle" or "bottom"
    // private static string vposM; // use if you want different pos for mobile - same as vpos
    public static void init(int devId, int gameId, int zoneId)
    {
        ApplixirWebGL.devId = devId;
        ApplixirWebGL.gameId = gameId;
        ApplixirWebGL.zoneId = zoneId;
        // ApplixirWebGL.custom1 = custom1; // values are encrpted AES-256-CBC client to server
        // ApplixirWebGL.custom2 = custom2: // with ports locked between client to server
        // ApplixirWebGL.dMode = dMode; // dMode determines if MD5 hash is useed server to server
        // ApplixirWebGL.prebid = prebid; // enables prebid mode
        // ApplixirWebGL.pb_sec = pb_sec; // prebid targeting section/category
        // ApplixirWebGL.pb_key = pb_key; // prebid targeting key/subject
        // ApplixirWebGL.fallback = fallback; // 0 (default) or 1
        // ApplixirWebGL.vSize = vSize; // "640x360" (default) or "640x480"
        // ApplixirWebGL.vpos = vpos;
        // ApplixirWebGL.vposM = vposM;
    }
    public static void onPlayVideoResultString(string result)
    {
        Debug.Log("GOT VIDEO RESULT CALLBACK: " + result);
        PlayVideoResult pvr = PlayVideoResult.ADS_UNAVAILABLE;
        if (!string.IsNullOrEmpty(result))
        {
            result = result.ToLower().Trim();
            switch (result)
            {
                case "ad-watched":
                    pvr = PlayVideoResult.AD_WATCHED;
                    break;
                case "network-error":
                    pvr = PlayVideoResult.NETWORK_ERROR;
                    break;
                case "ad-blocker":
                    pvr = PlayVideoResult.AD_BLOCKER;
                    break;
                case "ad-interrupted":
                    pvr = PlayVideoResult.AD_INTERRUPTED;
                    break;
                case "ads-unavailable":
                    pvr = PlayVideoResult.ADS_UNAVAILABLE;
                    break;
                case "fb-watched":
                    pvr = PlayVideoResult.FB_WATCHED;
                    break;
                case "cors-error":
                    pvr = PlayVideoResult.CORS_ERROR;
                    break;
                case "no-zoneId":
                    pvr = PlayVideoResult.NO_ZONEID;
                    break;
                case "ad-started":
                    pvr = PlayVideoResult.AD_STARTED;
                    break;
                case "fb-started":
                    pvr = PlayVideoResult.FB_STARTED;
                    break;
                case "sys-closing":
                    pvr = PlayVideoResult.SYS_CLOSING;
                    break;
                case "ad-initready":
                    pvr = PlayVideoResult.AD_INITREADY;
                    break;
                default:
                    pvr = PlayVideoResult.ADS_UNAVAILABLE;
                    break;
            }
        }
        if (callback != null)
        {
            callback(pvr);
            callback = null;
        }
    }
}

I couldn't fix that. Help m!

4
PlayMaker Help / In-Game live leaderboard
« on: February 23, 2021, 11:21:59 PM »
Hi,

I managed to did Highs core table with player name (Listing High to Low)

I need something like. I wanted to list players name and their score high to low in order in the game. I couldn't get it done. Any hints ?

Thanks

5
PlayMaker Help / [SOLVED] PUN 2 - Duplicate View ID found
« on: February 20, 2021, 08:53:09 PM »
Hi,

I used PUN load level action to load the level scene. Then, when round finished, I use Load Level Num action to load the Main menu.

I have Playmaker Photon Proxy prefab in Main Menu scene only

I got this error on console once it loaded Main Menu

Quote
PhotonView ID duplicate found: 1. New: View 1 on PlayMaker Photon Proxy (scene) old: View 1 on PlayMaker Photon Proxy (scene). Maybe one wasn't destroyed on scene load?! Check for 'DontDestroyOnLoad'. Destroying old entry, adding new.
UnityEngine.Debug:LogError(Object)
Photon.Pun.PhotonNetwork:RegisterPhotonView(PhotonView) (at Assets/Photon/PhotonUnityNetworking/Code/PhotonNetworkPart.cs:1003)
Photon.Pun.PhotonView:Awake() (at Assets/Photon/PhotonUnityNetworking/Code/PhotonView.cs:590)

Quote
InvalidOperationException: Duplicate key 1
ExitGames.Client.Photon.NonAllocDictionary`2[K,V].Add (K key, V val) (at <55327f06489f4ebdb665a4707c165dbb>:0)
Photon.Pun.PhotonNetwork.RegisterPhotonView (Photon.Pun.PhotonView netView) (at Assets/Photon/PhotonUnityNetworking/Code/PhotonNetworkPart.cs:1014)
Photon.Pun.PhotonView.Awake () (at Assets/Photon/PhotonUnityNetworking/Code/PhotonView.cs:590)

Couldn't figure it out

6
PlayMaker Help / PUN 2 - Scorecard Highest to Lowest
« on: January 17, 2021, 02:21:16 PM »
hi,

managed to get working scorecard with PUN 2. It's just get nickname and add score every time receive add score RPC. It involved Array and create text object in panel.

I did ordering scoreboard with single player mode. but, never tried with PUN2. can it done by same as Single player mode (Arraylist) or any other method needed ?

Thanks

7
PlayMaker Help / PUN 2 Errors
« on: January 01, 2021, 02:07:44 AM »
Hi !

Imported PUN 2 from asset store. I don't see working* package on Ecosystem. I downloaded it from Github.

It gave below error
Quote
Assets\PlayMaker PUN 2\Actions\Common\TypedLobbyProperty.cs(35,33): error CS7036: There is no argument given that corresponds to the required formal parameter 'name' of 'TypedLobby.TypedLobby(string, LobbyType)'

I pasted the entire folder from my old project , it fixed.

And I don't see download link for Sample Connection package too. I copied that from Old project.

Pls check

8
PlayMaker Help / Playmaker for core and Mirror for multiplayer
« on: December 12, 2020, 09:12:32 PM »
Hi,
I know there is no actions for Mirror Networking.
I am working on an .io game. I made the core with Playmaker.

Planning to use Mirror Networking for multiplayer. Can i hire a C# developer to integrate Mirror into Playmaker game?

Will it work ?

Thanks

9
PlayMaker Help / Tap to Shoot Ball
« on: November 22, 2020, 03:59:39 AM »
Hello !

See this video. I am trying to create something like this. I did ball movement. Gravity enables sphere and added force on Z axis (No every frame)

I couldn't figure out that how the shooting ball working. It is not spawning on Cannon. But, from middle of the screen. How to do tis exactly ?

Plus, ball moving direction depend on where you tap. Any idea?


10
PlayMaker Help / PUN 2 - Display HP over the Player
« on: November 06, 2020, 07:08:34 PM »
Hi,

Making a proto of RTS game using PUN 2. When everytime spawn new units, I wanna display HP of that Unity above it's head.

i used Text Follow Object sample and it working on Single player mode. But, how to get it done in PUN 2 ?

11
PlayMaker Help / PUN 2 - Get Players HP
« on: November 01, 2020, 09:38:05 PM »
hi !

2 players per room.
I managed to list the players in room. I have no idea that how to retrieve their HP. Player prefab has HP FSM

Thanks

12
PlayMaker Help / [solved] HP reduction like float interpolate
« on: November 01, 2020, 05:22:22 PM »
Hello !

Health - 50
Damage - 10

When got hit, damage will be 40. what i want is something like float interpolate. it should take few secs.

i couldn't get the logic.

Help  ;)

13
PlayMaker Help / PUN 2 - Getting number of Players in room error
« on: October 28, 2020, 01:32:35 PM »
Hello !

I wanted to get number of players in the room. I used PUN get room properties action and saved the Players count. It worked. But, console showing an error.

My Unity 2019.3.15f1

Error :
Code: [Select]
NullReferenceException: Object reference not set to an instance of an object
HutongGames.PlayMaker.FsmArray.SaveChanges () (at C:/Projects/Playmaker_1.9.0/Projects/Playmaker.source.unity/Assets/PlayMaker/Classes/FsmVariables/FsmArray.cs:341)
HutongGames.PlayMaker.FsmArray.set_Values (System.Object[] value) (at C:/Projects/Playmaker_1.9.0/Projects/Playmaker.source.unity/Assets/PlayMaker/Classes/FsmVariables/FsmArray.cs:153)
HutongGames.PlayMaker.Pun2.Actions.PunGetRoomProperties.getRoomProperties () (at Assets/PlayMaker PUN 2/Actions/PunGetRoomProperties.cs:145)
HutongGames.PlayMaker.Pun2.Actions.PunGetRoomProperties.OnEnter () (at Assets/PlayMaker PUN 2/Actions/PunGetRoomProperties.cs:103)
HutongGames.PlayMaker.FsmState.ActivateActions (System.Int32 startIndex) (at C:/Projects/Playmaker_1.9.0/Projects/Playmaker.source.unity/Assets/PlayMaker/Classes/FsmState.cs:205)
HutongGames.PlayMaker.FsmState.OnEnter () (at C:/Projects/Playmaker_1.9.0/Projects/Playmaker.source.unity/Assets/PlayMaker/Classes/FsmState.cs:175)
HutongGames.PlayMaker.Fsm.EnterState (HutongGames.PlayMaker.FsmState state) (at C:/Projects/Playmaker_1.9.0/Projects/Playmaker.source.unity/Assets/PlayMaker/Classes/Fsm.cs:2771)
HutongGames.PlayMaker.Fsm.SwitchState (HutongGames.PlayMaker.FsmState toState) (at C:/Projects/Playmaker_1.9.0/Projects/Playmaker.source.unity/Assets/PlayMaker/Classes/Fsm.cs:2718)
HutongGames.PlayMaker.Fsm.UpdateStateChanges () (at C:/Projects/Playmaker_1.9.0/Projects/Playmaker.source.unity/Assets/PlayMaker/Classes/Fsm.cs:2643)
HutongGames.PlayMaker.Fsm.UpdateState (HutongGames.PlayMaker.FsmState state) (at C:/Projects/Playmaker_1.9.0/Projects/Playmaker.source.unity/Assets/PlayMaker/Classes/Fsm.cs:2787)
HutongGames.PlayMaker.Fsm.Update () (at C:/Projects/Playmaker_1.9.0/Projects/Playmaker.source.unity/Assets/PlayMaker/Classes/Fsm.cs:1995)
PlayMakerFSM.Update () (at C:/Projects/Playmaker_1.9.0/Projects/Playmaker.source.unity/Assets/PlayMaker/PlayMakerFSM.cs:594)

14
PlayMaker Help / Photon - Spawning common object to all players
« on: October 25, 2020, 01:23:51 PM »
Hi !

This is for aa co-op game. Random zombies will be spawned from Game manager. If Zombies array had 5 zombies, system will spawn random every x seconds. What i want is, since Game Manager is common for all players, how to spawn same zombies for all players in that room ?

new to photon.

Thanks

15
PlayMaker Help / Photon display opponent HP (solved)
« on: October 24, 2020, 06:49:08 PM »
Hello !

Learning Photon. my case is 1 vs 1 combat game. concept and create units and destroy opponent castle.

How to display opponent unit count and opponent castle HP on right side ?

Thanks

Pages: [1] 2 3 ... 9