Designing random battle system [SOLVED]

Started by Construed, Sun 19/02/2012 19:35:28

Previous topic - Next topic

discordance

LET ME CHIP IN

I HAVE CREATED A FUNCTION TO HELP YOU WITH YOUR BATTLE SYSTEM

Code: ags

function addHp(int amount)
{
  playerHp += amount;
  if (playerHp > playerMaxHp) playerHp = playerMaxHp;
}


GODSPEED BROTHER AND BEST OF LUCK WITH YOUR BATTLE SYSTEM

WHAM

Code: ags

function decreaseHP(int amount)
{
playerHp -= amount;
if (playerHp < 0) 
{
playerHp = 0;
Display("GAME OVER - YOU ARE TEH DED"); 
QuitGame(0);
}
}


Well, I thought I could chip in too, here's a function I created to help you. I took over 20 seconds to make it, though, so it better fits the style of your code.
Wrongthinker and anticitizen one. Utterly untrustworthy. Pending removal to memory hole.

Construed

The entire battle system is gone, as well as 3 weeks worth of edits.
Game.agf crashed. Guess i should have backed up more often  :=
I felt sorry for myself because I had no shoes.
Then I met the man with no feet.

Shane 'ProgZmax' Stevens

Just because an agf file crashes does not mean it's lost.  CJ, for example, has been known to recover agf's for people when he's around and has free time, so don't just throw your work away.  :'(

Construed

#24
Yea, i tried everything including system restore to recover it.
I think i have 1 untampered copy, however it gives me this wall of death:

Code: ags

---------------------------
Adventure Game Studio
---------------------------
An error occurred whilst trying to load your game. The error was: 



Unexpected end of file has occurred. The following elements are not closed: GUIButton, Controls, GUIMain, GUIs, Game, AGSEditorDocument. Line 3877, position 7.



If you cannot resolve the error, please post on the AGS Technical Forum for assistance.



Error details: System.Xml.XmlException: Unexpected end of file has occurred. The following elements are not closed: GUIButton, Controls, GUIMain, GUIs, Game, AGSEditorDocument. Line 3877, position 7.

   at System.Xml.XmlTextReaderImpl.Throw(Exception e)

   at System.Xml.XmlTextReaderImpl.Throw(String res, String arg)

   at System.Xml.XmlTextReaderImpl.Throw(Int32 pos, String res, String arg)

   at System.Xml.XmlTextReaderImpl.ThrowUnclosedElements()

   at System.Xml.XmlTextReaderImpl.ParseElementContent()

   at System.Xml.XmlTextReaderImpl.Read()

   at System.Xml.XmlLoader.LoadNode(Boolean skipOverWhitespace)

   at System.Xml.XmlLoader.LoadDocSequence(XmlDocument parentDoc)

   at System.Xml.XmlLoader.Load(XmlDocument doc, XmlReader reader, Boolean preserveWhitespace)

   at System.Xml.XmlDocument.Load(XmlReader reader)

   at System.Xml.XmlDocument.Load(String filename)

   at AGS.Editor.AGSEditor.LoadGameFile(String fileName)

   at AGS.Editor.Tasks.LoadGameFromDisk(String gameToLoad, Boolean interactive)

   at AGS.Editor.InteractiveTasks.LoadGameFromDisk(String gameToLoad)
---------------------------
OK   
---------------------------





and might have been irreversably damaged in the restore....
and i cant even open it to see if the sprites rooms and views are there...
See what happened is my pc had a memory leak and when i want to load a room it said the room didn't exist, then i tried to save the game and it threw me a fatal error. so I'm guessing half of certain things got saved, random bits of info because of the memory leak or whatever and now all the information is scattered and missing pieces.
Kinda hard to explain, but i think you'll know what i mean.
I felt sorry for myself because I had no shoes.
Then I met the man with no feet.

steptoe

Understanding your frustrations GrimReapYou I can only add that at times you have to eat humble pie and take notice of certain people on here that I have great praise for.

I myself have been shot down a few times and have the scars too prove it, but in the end it makes you stronger and better.

You say you won't recruit a team to help, bad move. If you want it done ask in the right place.

Would you build a house on your own? No, you would recruit a team. Good move.

Comments by Khris are well founded and I have always found him compliant in most cases and helpful as a fellow scripter as well as giving out the odd bollocking.

Lashing out in temper all the time will deter anyone from helping you.

So, take heart, rethink, get back in check and start again. This may well bring you success.

;)




Construed

Yea, perhaps I'm sometimes too harsh and hasty with my words and actions.
I guess thats what Bi-polar, ADHD , hyperactive and explosive disorder do.
I spent many years not believing that i have mental illnesses but i guess the proof is in the pudding.
Its not so much myself that i feel sorry for as the people who are subjected to me.
I felt sorry for myself because I had no shoes.
Then I met the man with no feet.

Construed

Recent good news though is, my wife had an old copy of my source and I've found im able to manually retrieve most of the scripts just have to redo the views  :=
I felt sorry for myself because I had no shoes.
Then I met the man with no feet.

steptoe

That's great news.

Go at it with a different view of getting it done properly and I hope you succeed.

End of story I think...

;)

Construed

Thanks, and also thanks to all the people of the forums,
I probley should have been banned long ago  :o
I felt sorry for myself because I had no shoes.
Then I met the man with no feet.

SMF spam blocked by CleanTalk