I thought that if someone wrote actual source code, I would be able to understand it.
void main(){
void self = getlocalvar("self");
void vAniID = getentityproperty(self,"animationID");
int MP = getentityproperty(self,"mp");
if(vAniID != openborconstant("ANI_SPECIAL")){
changeentityproperty(self, "mp", MP + 1);
}
}
I would like to implement a feature where mana is recovered every time I hit an enemy, like in Guardians / Denjin Makai II by Banpresto.
If anyone knows how to do this, I’d really appreciate your help.
Welcome to the community @kimduck.
That's already the default behavior. You don't really need to do anything other than enabling MP in the first place. See MP in the manual.
DC
The manual is too long, so I couldn't find the relevant section.
If you could tell me which part of the manual it’s in, or what keyword I should search for, I’d really appreciate it.
typemp {int}
- Controls the conditions under which a player's MP can recover.
- 0 (or leave blank) = players will recover MP slowly over time.
- 1 = players will recover some MP when they hit an enemy.
- 2 = players can't recover MP without using items or dying.
set Arcade_Mode
lives 5
credits 5
nosame 1
typemp 1
#noshare 1
musicoverlap 1
maxplayers 4
branch Stage1
z 394 488
scene data/scenes/target/tar1.txt
file data/levels/miami.txt
next
scene data/scenes/target/tar2.txt
branch Stage2-1
z 190 265
file data/levels/italy1.txt
branch Stage2-2
z 183 266
file data/levels/italy2.txt
검색창을 이용하거나 Ctrl+F를 동시에 눌러 원하는 것을 찾아보세요. 잠깐만요. typemp가 당신이 찾는 프로그램이 아닌가요?
Thanks, bro. But using typemp 0 or typemp 1 recovers +5 MP per hit.
I want to recover +1 MP for each hit instead.
Also, I want to implement an mprate system in the character’s properties, so MP regenerates over time even when standing still, in addition to recovering when landing attacks.
Right now, since I don’t know a better way, I added this to the hitflash (FqBlood1) like this:
The manual is too long, so I couldn't find the relevant section.Thread moved, please keep similar threads in the same place.
The manual is too long, so I couldn't find the relevant section.
If you could tell me which part of the manual it’s in, or what keyword I should search for, I’d really appreciate it.
as someone who updates that manual for years, its a bit disrespectful. Maybe its a language barrier...so I couldn't find the relevant section.
It's not that I haven't read it. It's that I can't read it.방금... 무뚝뚝하거나 불친절하게 굴고 싶지는 않지만, 당신은 우리를 무시했을 뿐만 아니라 가장 기본적인 학습 단계조차 따르지 않으려고 하시는군요. 이 포럼과 문서 작성에 정말 많은 노력을 쏟고 있습니다. 너무 많다고 생각해서 사용을 거부한다면, 프로젝트를 완료할 가능성이 거의 없다는 뜻입니다. 또한 매우 무례한 행동이며, 우리가 당신을 도울 수 있는 여지도 거의 없습니다.
DC
All set buddy. I thought it would be a language barrier.I know the manuals were written with great effort, but I'm truly unable to read them.
I'm sorry. If I made anyone feel bad, I sincerely apologize.
I thought that if someone wrote actual source code, I would be able to understand it.
void main(){
void self = getlocalvar("self");
void vAniID = getentityproperty(self,"animationID");
int MP = getentityproperty(self,"mp");
if(vAniID != openborconstant("ANI_SPECIAL")){
changeentityproperty(self, "mp", MP + 1);
}
}
It's not that I haven't read it. It's that I can't read it.
There is just too much content to translate all of it.
I can only make rough guesses. Even with page translation tools, there are limitations.
To be honest, I can't even tell whether it's programming language, an explanation, or a translation.
However, I have analyzed and modified many text files in some OpenBOR games on my own, and tested them directly.
That's how I was able to understand the contents of the txt files by myself. But even that had its limits.
So, I came here to the OpenBOR development side and tried reading the manuals.
But since I'm not an English speaker, I found it very difficult to understand the manuals.
Honestly, it's easier for me to understand a pattern of source code that I can analyze directly myself.
If I offended anyone, I apologize. I've read the manual before, too.
But due to the language barrier, there are limits to my understanding.
That's why I came here to ask questions.
I thought that if someone wrote actual source code, I would be able to understand it.
I know the manuals were written with great effort, but I'm truly unable to read them.
I'm sorry. If I made anyone feel bad, I sincerely apologize.
Wow~ Really, thank you, brother. I've asked ChatGPT so many times just to make this work, but it kept giving me strange answers.알겠습니다. 이 목적을 위해 간단한 스크립트를 작성했습니다.
MPFill.c
[코드=c]
void main(){
void self = getlocalvar("self");
void vAniID = getentityproperty(self,"애니메이션ID")
int MP = getentityproperty(자기 자신, "mp");
if(vAniID != openborconstant("ANI_SPECIAL")){
changeentityproperty(self, "mp", MP + 1);
}
}
[/암호]
이 스크립트를 data/scripts 폴더에 저장하세요. 캐릭터 헤더에 다음 줄을 추가하여 스크립트를 선언하세요.
didhitscript 데이터/스크립트/mpfill.c
이 스크립트를 사용하면 SPECIAL 애니메이션을 제외하고 명중이 성공할 때마다 MP가 1씩 채워집니다.
특정 애니메이션이 MP를 다시 채우지 않도록 하려면 애니메이션 확인을 추가했습니다.
HTH