Comments (4)
Added a suggestion about an extra option in camera type.
from openbor.
Actually you can do all this with script already anyway. Back in the day when i started my DD game i also asked about this feature and also other people too but i think they never added because it already can be done what you are asking.
Anyway, Bloodbane back then showed me this little trick he used on his contra game, which is to add a small anim script on idle that includes this: changelevelproperty("camerazoffset", -100 - y) or changelevelproperty("camerazoffset", -100 - base).
Here are the small functions i made for my game with it:
void camera()
{ // Spawn and bind other entity
void self = getlocalvar("self");
void P1 = getplayerproperty(0, "entity");
void P2 = getplayerproperty(1, "entity");
void vAniID1 = getentityproperty(P1,"animationID");
void vAniID2 = getentityproperty(P2,"animationID");
int Offset1 = getentityproperty(P1,"base");
int Offset2 = getentityproperty(P2,"base");
int Offset3 = getentityproperty(P1,"a");
if(P2){
changelevelproperty("camerazoffset", -100 - Offset2);
}
if(P1){
changelevelproperty("camerazoffset", -100 - Offset1);
}
if(P1 != NULL() && getentityproperty(P1,"exists") && P2 != NULL() && getentityproperty(P2,"exists") && vAniID1 == openborconstant("ANI_IDLE") || vAniID1 == openborconstant("ANI_JUMPLAND")){
changelevelproperty("camerazoffset", -100 - Offset1);
}else if(P1 != NULL() && getentityproperty(P1,"exists") && P2 != NULL() && getentityproperty(P2,"exists") && vAniID1 == openborconstant("ANI_FOLLOW22") || vAniID1 == openborconstant("ANI_FOLLOW23")){
changelevelproperty("camerazoffset", -100 - Offset3);
}
}
void camera2()
{ // Spawn and bind other entity
void P1 = getplayerproperty(0, "entity");
void P2 = getplayerproperty(1, "entity");
int Offset1 = getentityproperty(P1,"a");
int Offset2 = getentityproperty(P2,"a");
if(P2){
changelevelproperty("camerazoffset", -100 - Offset2);
}else if(P2 && P1 != NULL() && getentityproperty(P1,"exists")){
changelevelproperty("scrollspeed", 1);
}
if(P1){
changelevelproperty("camerazoffset", -100 - Offset1);
}else if(P1 && P2 != NULL() && getentityproperty(P2,"exists")){
changelevelproperty("camerazoffset", -100 - Offset1);
}
}
The "camera" function (first one) is checking the player's base, so it only moves on Z and not on Y when player jumps. And i only had to add it to idle and jumpland animation for my use. The second function "camera2 is checking player's Y and i was using it on my clibing animations so the camera follows up/down.
Now my scripts are a bit poorly made but ok for my purpose but the idea is with the changelevelproperty("camerazoffset", -100 - Y); or changelevelproperty("camerazoffset", -100 - base); you can do nice little functions or parts of a mainscript which will take care of the camera problem.
Also if you only need this for only just one spot in only one stage you can just place a blank entity on that spot with the script on it so that you will not need to having it on players all time.
from openbor.
@magggas thank you.
from openbor.
Closing since specific issue is resolved. Development code is opening all level properties, including camera switches.
from openbor.
Related Issues (20)
- Sound effects keep popping and scratching on ppsspp and linux. HOT 20
- PSP build causes file access errors. Some games are just blank on PSP build. HOT 1
- Linux AMD64 Build fails on Gentoo Linux. HOT 20
- Fails to build on Manjaro x64 HOT 23
- Linux Arm64 Build HOT 13
- Xbox One controller left dpad button not working HOT 1
- Bare Knuckes III Yesterday Once More Crashes in the last version
- Annoying sound noises in many games even with BGM and sound effect set to ZERO. HOT 1
- Wrong wiki link HOT 1
- issues with Openbor 4.0 Build 7533 in wine running marvel-first-alliance-2 HOT 3
- New Debug Setting Option: Ingame Debug Log HOT 1
- Cutscenes x skipselect (cannot load players)
- gamecontroller support broken on embedded Linux (aarch64) HOT 2
- New Run Config field: run.speed.z HOT 1
- Appimage require fuse libfuse.so.2 but the lib is here... appimage can't be extracted... HOT 2
- Change config files to .ini instead of binary .cfg file HOT 12
- Options at pause menu HOT 1
- [Suggestions] Mouse + Autofire HOT 4
- attack.damage.type doesn't work properly
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 openbor.