Comments (4)
Hi,
This is a feature not used often, since levels have been introduced, so the API needs some refactor and the doc is a bit outdated.
To begin with pull the latest nodegame-client, or install latest dev, otherwise an error will be raised.
Say you have a stage with three steps, you can do the following:
In player.js:
stager.extendStep('step1', {
stepRule: stepRules.SOLO,
});
stager.extendStep('step2', {
stepRule: stepRules.SOLO,
});
stager.extendStep('step3', {
stepRule: stepRules.WAIT,
});
In logic.js
stager.extendStep('step1', {
stepRule: stepRules.OTHERS_SYNC_STAGE,
cb: function() {
// Prevents to go to next step, instead goes to next stage.
node.game.breakStage(true);
}
});
It is a bit cumbersome, but it will work.
from nodegame.
I have updated the doc, it should be clearer now. There is a warning that the API is in refactor and it may change in the next release.
from nodegame.
Can I close?
from nodegame.
Great! Thank you! It works.
from nodegame.
Related Issues (20)
- Debug Mode should output all errors to screen in overlay layer HOT 1
- Calls to stager.stepBlock prevent to correctly close stageBlocks
- Repeated client game sessions HOT 8
- PhantomJS causes installation to fail HOT 1
- Add installation option to not install the ultimatum game HOT 1
- WAIT_TIME = 0 might cause problems if all players minus one are DONE
- Replying node.on.done on localhost might send msgs too early HOT 1
- Visual Timer Widget bug on level change HOT 1
- PLAYER_SORTING in Waiting-room wiki DOC is wrong HOT 4
- Memory Database: Intro WIKI invalid code example HOT 1
- setup settings not applied to waiting room
- Improve REMOTE_DISPATCH in wait room
- Handle SIGTERM gracefully
- Allow search by player id in the Monitor
- Create Auth link from the monitor interface
- Allow adding weights to treatments, so that some get sampled more or less often
- item.from and item.player: use a unique identifier
- Consent Widget and DisconnectBox
- Asterisk in survey widgets needs options
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from nodegame.