Skip to main content

On Sale: GamesAssetsToolsTabletopComics
Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
TagsGame Engines

Ikalou

7
Posts
2
Topics
2
Following
A member registered Sep 02, 2016

Recent community posts

(1 edit)

Salut,

Je ne sais pas si cela répond à ta question, mais tu as toujours accès à l'API de Superpowers via "Sup".

Exemples :

- window.Sup.loadScene("Scenes/World01");

- window.Sup.getActor("Camera").camera.getFOV()

- window.Sup.getActor("MyPlayer").__behaviors.PlayerBehavior[0].takeDamage()

Well... I ended up using a bash script to do the same thing. It's not pretty, and there are probably some differences, but it works ok : https://gist.github.com/Ikalou/d7df51d1de05e4ccbaee08e79c52dea0.

(3 edits)

Hi,

Say I have the following hierarchy and all the required dependencies:

core
___systems
______game
___projects
______my_project

Is there a supported way to automatically trigger the build of "my_project" ?

Like the "build" button does on the app...

... but in a way that can be automated in a build system (e.g. by running a script, think GitLab CI).

Or do I have to start a server and send it some command over the network? A lot seems to be happening in plugins/default/gameSettings/build/buildGame.ts...

I'll take any help or pointers you have. Thanks.

(3 edits)

Sure.

1) Go to your project folder (%AppData%/Superpowers/projects/ on Windows, see this page)

2) Add your existing git repository as a remote, commit and push

git init
git remote add origin <repourl>
git add .
git commit -m 'Initial commit'
git push -u origin master

This page has some information on superpowers and source control integration.

If you use Windows, you're probably going to need Git for Windows or the Github app. If you're new to git, github has some nice tutorials.

After trying various things, I'm just going to give up and individually move all the p2 bodies in my scene/prefab.

As soon as the scene components awake, their global position is tied to that of their p2 body, so I don' think there is a way around it

Hi,

I'm using p2. You're right, thank you, if I remove all p2 bodies from my scene setPosition works as expected.

I assume there is a p2 equivalent to arcade body's warpPosition()? But then, do I have to call that method on every single p2Body in my scene hierarchy after I append it? Is there no simpler/better way?

Thanks again for the help.

(1 edit)

Hi all,

Sorry if this is a silly question, but is it possible to move an actor to some position after it has been added with appendScene?

This works:

const spawner = new Sup.Actor("Spawner");
spawner.setPosition(SomePosition);
Sup.appendScene("Prefabs/Patterns/World1/Pattern1", spawner);

But this doesn't (it appears at the origin instead of at SomePosition)

const pattern = Sup.appendScene("Prefabs/Patterns/World1/Pattern1")[0];
pattern.setPosition(SomePosition);

My "Pattern1" scene looks like this, with a single actor at the root:

- Pattern

- Ground

...

- ...

I don't know the desired position of the actor ("Pattern") until after I create it, so the first solution doesn't really work for me.

Any help is appreciated. Thanks.

(Edited the title to reflect that this is not strictly a appendScene issue)