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.


Messages - Raika

Pages: [1] 2
1
PlayMaker Help / [SOLVED] Pun classic/pun 2 errors, ecosystem search issue.
« on: September 30, 2019, 05:59:56 AM »
After importing PUN 2 from asset store and Play Maker Pun2 from ecosystem i get those errors:
Quote
Assets\PlayMaker PUN 2\Editor\PlayMakerPhotonWizard.cs(39,13): error CS0103: The name 'RegisterOrigin' does not exist in the current context

Assets\PlayMaker PUN 2\Editor\PlayMakerPhotonWizard.cs(39,45): error CS0117: 'AccountService' does not contain a definition for 'Origin'

Assets\PlayMaker PUN 2\Editor\PlayMakerPhotonWizard.cs(84,13): error CS0103: The name 'RegisterOrigin' does not exist in the current context

Assets\PlayMaker PUN 2\Editor\PlayMakerPhotonWizard.cs(84,45): error CS0117: 'AccountService' does not contain a definition for 'Origin'
I found this https://hutonggames.com/playmakerforum/index.php?topic=21157.msg92847#msg92847 in short:
I delete PlayMakerPhotonWizard.cs and it's working now.
But Jean said:
Quote
Hi,

You likely haven't installed pun 2 package, but pun classic (v1).

 Bye,

 Jean
Now i'm confused cuz i was sure that i imported pun 2 from asset store and then pun 2 from eco, so i created new project PM>eco>From asset store:https://assetstore.unity.com/packages/tools/network/pun-2-free-119922>from eco:


and i still get same error so maybe PM pun2 have some files from pun1?

I'm concerned about deleting PlayMakerPhotonWizard.cs. Can this create some errors in future or maybe this file shouldn't be in package?

Also i tried start with pun classic but i cant find pun 1/classic on eco, only this:

And manual link from here https://hutonggames.fogbugz.com/default.asp?W928 (PlayMakerPUN.unitypackage) is getting me 404.






2
PlayMaker Help / Re: Multiplayer AI Synchronization (pun)
« on: June 24, 2019, 02:38:09 AM »
 Is there someone who has experience with this and can share some insights?

3
PlayMaker Help / Multiplayer AI Synchronization (pun)
« on: June 22, 2019, 03:10:09 AM »
Quick info about game: similar to diablo, 1-4 players, up to 25 enemy can be on screen on the same time, besides deal damage player can also inflict effects such as stun, slow or push enemy.

Queastion: to synchronize enemy movement for multiplayer, better is to sync target for NavMesh  (1 photon view used be manager) or put photon view on all enemy and sync current position?

4
This is the solution to which I came, raycast to find white space, then check if this point is not to close to wall, then (in my case):
use 32 rays around this point, if more than 5 rays don't hit wall and if those rays are spread on multiple sides, point is deleted.

That's the result (for now):

6
I will try to explain, i need to use this mostly for creation of cave. When player enter new cave, game need to generate this cave, first step is generating shape (picture in my previous post), then i need to randomly spawn objects (e.g: iron ore), so i need just to know where is empty space, but to estimate where to place essential objects like cave entrance (player spawn), another passage (to another cave), treasure chest etc, I would like to be able to put these things on the ends of the cave, but i dont know how to do that. If you have some idea i will be thankful.
My plan was to start using Raycast/GetPixelColor from the corner to find closest place and put one essential object there and other on the opposite side of cave.
e.g:

What would be perfect (ends of cave) but dont know how to do that:


My plan with ray/pixelcolor:

7
More specific my cave have black walls, white empty space so I was thinking that taking picture from above and Get Pixel Color will be better because I need use this from hundreds to thousands of time, eg:

8
So i have random generated cave(walls and empty space), how will it be better to add objects to the empty space? Raycast or take cave picture and Get Pixel Color?

9
Finally i have solution, As I wrote in the previous post, the problem occurs when the Get Property or Call Method actions are used in one particular script (also with a small difference the problem occur in 1.8.5). So i created new script which i'm accessing via fsm and this script can access issueScript without problem. I don't know what created this issue, but this specific solution work for me.

10
So i done few more testing, issue occurs when action: Get Property is activated.
Below is script on which one i'm using this action. Can it by problem with script?
I hadn't made this script.
Quote
using UnityEngine;
using System.Collections;

public class MapGenerator : MonoBehaviour
{

    public enum DrawMode { NoiseMap, ColourMap };
    public DrawMode drawMode;

    public int mapWidth;
    public int mapHeight;
    public float noiseScale;

    public int octaves;
    [Range(0, 1)]
    public float persistance;
    public float lacunarity;

    public int seed;
    public Vector2 offset;

    public bool autoUpdate;

    public TerrainType[] regions;
    //moje
    public int x;
    public int y;
    public float[,] MyNoiseMapFullXY;
    public float MyNoiseValueYes;

    public void GenerateMap()
    {
        float[,] noiseMap = Noise.GenerateNoiseMap(mapWidth, mapHeight, seed, noiseScale, octaves, persistance, lacunarity, offset);
        //test
        MyNoiseMapFullXY = noiseMap;
        //test
        Color[] colourMap = new Color[mapWidth * mapHeight];
        for (int y = 0; y < mapHeight; y++)
        {
            for (int x = 0; x < mapWidth; x++)
            {
                float currentHeight = noiseMap[x, y];
                for (int i = 0; i < regions.Length; i++)
                {
                    if (currentHeight <= regions.height)
                    {
                        colourMap[y * mapWidth + x] = regions.colour;
                        break;
                    }
                }
            }
        }

        MapDisplay display = FindObjectOfType<MapDisplay>();
        if (drawMode == DrawMode.NoiseMap)
        {
            display.DrawTexture(TextureGenerator.TextureFromHeightMap(noiseMap));
        }
        else if (drawMode == DrawMode.ColourMap)
        {
            display.DrawTexture(TextureGenerator.TextureFromColourMap(colourMap, mapWidth, mapHeight));
        }
    }

    void OnValidate()
    {
        if (mapWidth < 1)
        {
            mapWidth = 1;
        }
        if (mapHeight < 1)
        {
            mapHeight = 1;
        }
        if (lacunarity < 1)
        {
            lacunarity = 1;
        }
        if (octaves < 0)
        {
            octaves = 0;
        }
    }
    //test
    public void GiveMePerlinNoiseValue()
    {
        MyNoiseValueYes = MyNoiseMapFullXY[x, y];
    }
    //test
}

[System.Serializable]
public struct TerrainType
{
    public string name;
    public float height;
    public Color colour;
}

11
yes, 5.6.1f1/1.8.5 to 5.6.1f1/1.9.0. Can it be any related to legacy networking?

12
So, only after updating playmaker to 1.9.0 i get same issue, but i will just use 1.8.5.
Fsm that have this problem need to work only on start and than i can remove them, can this be good solution or not?

13
Ok, i will try this.

14
Now i'm after format,i done stupid thing, i was thinking that just copy folder with project and then open with newest installed unity will work. Than i created new project, install 1.9.0 and import all needed assets and then i copy/paste folder with mine scenes/prefabs. Also i copy/paste folder with globals. Game work properly (except for the problem I described).

So how many stupid things i done?

15
Now i'm using 2018.1.1f1/1.9.0 and i upgrade this project from 5.6.1f1/1.8.5.
Also when i pause scene, error still pop up and in the variables tab all variables have 0 used. If you want i can screenshot all the states or somehow export those objects.

Pages: [1] 2