Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

FPSC Classic Product Chat / [HELP] My DBP code in fpsc source code doesn't work

Author
Message
Hell_666
17
Years of Service
User Offline
Joined: 11th Jul 2009
Location: France
Posted: 10th Jan 2010 16:34 Edited at: 10th Jan 2010 16:35
Hello, I have added some code lines in the fpsc source code but it doesn't work as I want, can you help me please ?

This is my code :



It must hold the player's health at 999 HP, but the health doesn't change . Thanks for your help

Eternal suffering ...

I'm french
PW Productions
17
Years of Service
User Offline
Joined: 13th Mar 2009
Location: sitting in a chair.
Posted: 11th Jan 2010 03:04
It would be better in the DBPro forums, more help. I tried to mod FPSC, got some things to work, but quit for now, I only know a little bit, so I cannot help you. I'm sure if hockeykid, knxrb, S4Real, Ply, etc. come along, they'll help

-Pwp

Go to my website, if I get enough members, I will buy a domain and appoint more moderators
Hockeykid
DBPro Tool Maker
18
Years of Service
User Offline
Joined: 26th Sep 2007
Location:
Posted: 11th Jan 2010 03:52
Your string will be case sensitive so under the input add

cheat$=lower$(cheat$)

Also its is not wise to use cls and input in FPSC.

Silvester
20
Years of Service
User Offline
Joined: 7th Dec 2005
Location: Netherlands
Posted: 11th Jan 2010 06:58 Edited at: 11th Jan 2010 07:07
Quote: "Your string will be case sensitive so under the input add

cheat$=lower$(cheat$)

Also its is not wise to use cls and input in FPSC."


You missed the most important flaw Hockeykid.. He's trying to do this entire thing in ONE IF sequence, which means he only gets to run his cheat code when he continuesly holds keystate 21 down, and inputs godmode every frame.. A more sensible way of creating a cheat system would be something like this:

Declare this at the top of your code.


Declare this under the Array section


Place this inside your game loop


And put this elsewhere in your code, preferably at the end of your game loop so it will update after the damage calculations etc.


Note that it is NOT recommended to use CLS and Input, nor Wait.. They make the screen turn black, and freeze the entire game. You're better off writing your own Input function with some of the features DBP provides you with, it has a neat buffer for keyboard input for example which you can manipulate for this.

I wrote this without having DBP installed so my bad if there's any syntax errors in it.


EDP Map Editor[2D]
Hell_666
17
Years of Service
User Offline
Joined: 11th Jul 2009
Location: France
Posted: 11th Jan 2010 10:52
OK, I will try it when I will be at home, CLS ann input work good for me in fpsc, presse "y" key pause the game.

Thanks, I try this and I post again.

Eternal suffering ...

I'm french
Plystire
23
Years of Service
User Offline
Joined: 18th Feb 2003
Location: Staring into the digital ether
Posted: 11th Jan 2010 12:24
You should never use "input" when in a 3d environment in DBPro. It just... doesn't work that well, if at all. You can type things in, but the entire program must pause and wait for the user to finish typing. It'd be best for you to write your own (or find someone else's) input code for runtime sequence, so users can type while the program is still running.


Also, not sure if you just forgot to paste it in, but you're missing the "endif" for you first "if" statement. there are three if blocks in your code and only two "endif"s.


Also.... your code really depends upon where in the source you placed it. If placed in the wrong area, it may never be executed... or executed once... or executed only at certain times.
For the beginner modder, it may be best to place your code just before the "Update Screen" section, to ensure your code is executed every loop of gameplay.

You'll find that testing code and debugging can be very time consuming with FPSC, simply due to its long compile time.


The one and only,


Hell_666
17
Years of Service
User Offline
Joined: 11th Jul 2009
Location: France
Posted: 11th Jan 2010 19:07
My code has a good place, I believe, it work, but when I press enter nothins has changed.

Quote: "You can type things in, but the entire program must pause and wait for the user to finish typing."


I know, it's the goal, I prefer that game is paused to type cheats, but it's true it can be problematic, if it's a system speaking for example ^^ .

Quote: "Also, not sure if you just forgot to paste it in, but you're missing the "endif" for you first "if" statement. there are three if blocks in your code and only two "endif"s. "


I just forgot to past the "endif" in my post



I try this now and I post, thanks.

Eternal suffering ...

I'm french
Hell_666
17
Years of Service
User Offline
Joined: 11th Jul 2009
Location: France
Posted: 11th Jan 2010 20:12
I don't understand, I just wrote my code as Silvester but it doesn't work, the health doesn't change :s

Eternal suffering ...

I'm french
s4real
VIP Member
19
Years of Service
User Offline
Joined: 22nd Jul 2006
Location:
Posted: 11th Jan 2010 21:52
Why are you adding a God Mode into fpsc when there already one in Fpsc?

best s4real



Pack ya games with vishnu fpsc packer its free.
PW Productions
17
Years of Service
User Offline
Joined: 13th Mar 2009
Location: sitting in a chair.
Posted: 11th Jan 2010 23:27
Because FPSC's only sets your health to 9999, I guess he wants it to stay there

Go to my website, if I get enough members, I will buy a domain and appoint more moderators
Marc Steene
FPSC Master
20
Years of Service
User Offline
Joined: 27th Mar 2006
Location: Bahrain
Posted: 12th Jan 2010 13:18
He could just create an .fpi script...


FPSC MIGRATION: http://bit.ly/5I8LYO
FPSC NUCLEAR EXPLOSION: http://bit.ly/67v8GI
Hell_666
17
Years of Service
User Offline
Joined: 11th Jul 2009
Location: France
Posted: 12th Jan 2010 17:43
I want creat other cheats after, but all cheats don't work :s

Eternal suffering ...

I'm french

Login to post a reply

Server time is: 2026-07-17 23:55:02
Your offset time is: 2026-07-17 23:55:02