Author Topic: (no subject)  (Read 10877 times)

Xorlak

  • Administrator
  • Member
  • *****
  • Posts: 2225
    • View Profile
    • http://darkagegames.net
(no subject)
« Reply #15 on: January 31, 2004, 10:18:04 AM »
Quote from: "DarkElite"
i need so much help! Xorlak, how did you get the character (in battle) to change his position (like when you use an item) with out showing anything underhim (like when you put an image over an image) i would have thought it was the restorescreen method, but i dont see that bat "flash out and in"?   and is the an "invisable color" in the TK? like for Game Maker, if you have a certain shade of green, it will show nothing in its place?

I use #stance(position!, name$) to make the character change his pose.  But there is a bug so that it doesn't erase the old position completely.  One way to fix this it to do #savescreen before setting the character down and then #restorescreen(x1!, y1!, x2!, y2!, xdest!, ydest!) to restore that position of the screen when changing the stance.  (I actually use #scan and #mem because I use the #savescreen for something else, but it gives the same effect.)

Cesque is right (except it's #setimagetransparent, heh).
« Last Edit: December 31, 1969, 06:00:00 PM by Xorlak »

DarkElite

  • Member
  • *
  • Posts: 1452
    • View Profile
    • http://cryosoft.mysticsoftware.net/Home.html
(no subject)
« Reply #16 on: January 31, 2004, 10:44:45 AM »
hmm, interesting (another ingenius idea from xorlak  Laughing ) , but if youve set down the image of the character in the edit character place, y do you have the images of the character to set down too? and would you savescreen after or before you put down the enemy?
« Last Edit: December 31, 1969, 06:00:00 PM by DarkElite »
DarkElite

Dei vobem omniam proditiverunt.  Iam vobis quis deposcibitis sacrificium rersum vitae est!

DarkElite

  • Member
  • *
  • Posts: 1452
    • View Profile
    • http://cryosoft.mysticsoftware.net/Home.html
(no subject)
« Reply #17 on: January 31, 2004, 10:47:24 AM »
Quote from: "Xorlak"
One way to fix this it to do #savescreen before setting the character down and then #restorescreen(x1!, y1!, x2!, y2!, xdest!, ydest!) to restore that position of the screen when changing the stance.

huh? there are variable to use in restorescreen? how come it doesnt metion this in the manual? hmm... does that mean you can designate a value to savescreen too? ie. #SaveScreen(board1$)?
« Last Edit: December 31, 1969, 06:00:00 PM by DarkElite »
DarkElite

Dei vobem omniam proditiverunt.  Iam vobis quis deposcibitis sacrificium rersum vitae est!

DarkElite

  • Member
  • *
  • Posts: 1452
    • View Profile
    • http://cryosoft.mysticsoftware.net/Home.html
(no subject)
« Reply #18 on: January 31, 2004, 04:56:35 PM »
hmm... im having trouble including enemy stats heres the view...

Code: [Select]
#ene1prg$="Enemy_"+enemy1$+".prg"
#Include(ene1prg$)
#enemyhp[1]!=enemyhp!
#enemythp[1]!=enemythp!
#enemyattack[1]!=enemyattack!
#enemydefence[1]!=enemydefence!
#enemyspd[1]!=enemyspd!
#enemygiveexp[1]!=enemygiveexp!
#enemyitemgive[1]$=enemyitemgive$
#enemyspecial[1]!=enemyspecial!
#enemypotion[1]!=enemypotion!
#enemymagic[1]$=enemymagic$
#enemyposX[1]!=enemyposX!
#enemyposY[1]!=enemyposY!
#enemyX[1]!=enemyX!
#enemyY[1]!=enemyY!

#If (enemies!=2)
{
#ene2prg$="Enemy_"+enemy2$+".prg"
#Include(ene2prg$)
#enemyhp[2]!=enemyhp!
#enemythp[2]!=enemythp!
#enemyattack[2]!=enemyattack!
#enemydefence[2]!=enemydefence!
#enemyspd[2]!=enemyspd!
#enemygiveexp[2]!=enemygiveexp!
#enemyspecial[2]!=enemyspecial!
#enemypotion[2]!=enemypotion!
#enemymagic[2]$=enemymagic$
#enemyposX[2]!=enemyposX!
#enemyposY[2]!=enemyposY!
#enemyX[2]!=enemyX!
#enemyY[2]!=enemyY!
}

#If (enemy1$=enemy2$)
{
#enemyposX[2]!=enemyposX[1]!-enemyX[2]!-20
#enemyposY[2]!=enemyposY[1]!-enemyY[2]!-20
}
#Kill(ene1prg$)
#Kill(ene2prg$)

the two enemies im testing are the same, heres the program from "Enemy_Bat.prg"

Code: [Select]
#enemyhp!=35
#enemythp!=35
#enemyattack!=6
#enemydefence!=3
#enemyspd!=3
#enemygiveexp!=10
#enemyitemgive$=potion
#enemyspecial!=13
#enemypotion!=1
#enemymagic$=2
#enemyposX!=180
#enemyposY!=90
#enemyX!=66
#enemyY!=36
« Last Edit: December 31, 1969, 06:00:00 PM by DarkElite »
DarkElite

Dei vobem omniam proditiverunt.  Iam vobis quis deposcibitis sacrificium rersum vitae est!

Cesque

  • Member
  • *
  • Posts: 2178
    • View Profile
    • http://cesque.mysticsoftware.net
(no subject)
« Reply #19 on: February 01, 2004, 04:36:46 AM »
Hmmm, including? I only thinked this is good for #methods... Best way is to put in enemy stats when enemy attacks, THEN launch the battle program.

For example...

#enemyhp!=35
#enemythp!=35
#enemyattack!=6
#enemydefence!=3
#enemyspd!=3
#enemygiveexp!=10
#enemyitemgive$=potion
#enemyspecial!=13
#enemypotion!=1
#enemymagic$=2
#enemyposX!=180
#enemyposY!=90
#enemyX!=66
#enemyY!=36

#run("fight.prg")

Or make a #method out of battle system...

#method battle(enemyhp!,enemythp!,enemyattack!,enemydefence,...etc)
« Last Edit: December 31, 1969, 06:00:00 PM by Cesque »
TKGB cancelled Spyder.

Bastard.

Xorlak

  • Administrator
  • Member
  • *****
  • Posts: 2225
    • View Profile
    • http://darkagegames.net
(no subject)
« Reply #20 on: February 01, 2004, 10:15:15 AM »
Quote from: "DarkElite"
hmm... im having trouble including enemy stats heres the view...

Just including the program won't load the stats.  You need to run a method from the program that loads the stats.  Set up your enemy program like this:

Code: [Select]
#method loadenemy_bat()
{
#enemyhp!=35
#enemythp!=35
#enemyattack!=6
#enemydefence!=3
#enemyspd!=3
#enemygiveexp!=10
#enemyitemgive$=potion
#enemyspecial!=13
#enemypotion!=1
#enemymagic$=2
#enemyposX!=180
#enemyposY!=90
#enemyX!=66
#enemyY!=36
}

Now at the top of the first part, you'll have something like:

Code: [Select]
#ene1prg$="Enemy_"+enemy1$+".prg"
#Include(ene1prg$)
#loadcommand$="#loadenemy_"+enemy1$
#rpgcode(loadcommand$) *runs #loadenemy_bat method
#enemyhp[1]!=enemyhp!
...

Quote
huh? there are variable to use in restorescreen? how come it doesnt metion this in the manual? hmm... does that mean you can designate a value to savescreen too? ie. #SaveScreen(board1$)?


No, you can only have one #savescreen at a time  (unfortunately).  The "Juicy" plugin at the shack has something that does something similar though, but I hear it's a little buggy.

Quote
hmm, interesting (another ingenius idea from xorlak  ) , but if youve set down the image of the character in the edit character place, y do you have the images of the character to set down too? and would you savescreen after or before you put down the enemy?


You mean in Dark Age 2?  The extra images are for various special attacks.  I actually do #savescreen after setting down the enemy, and redraw everything when it dies.  But you can do it either way.
« Last Edit: December 31, 1969, 06:00:00 PM by Xorlak »

DarkElite

  • Member
  • *
  • Posts: 1452
    • View Profile
    • http://cryosoft.mysticsoftware.net/Home.html
(no subject)
« Reply #21 on: February 01, 2004, 10:33:44 AM »
now im confused! but the enemy loading is working now! thank cesque and xorlak! but i dont get the scaning tiles and redraw them and all that stuff you said you did, cause when i scan tem with a bitmap (hoping the bitmap will save into it) it wont work, and the redrawing thing, are you talking about #ForceRedraw?
« Last Edit: December 31, 1969, 06:00:00 PM by DarkElite »
DarkElite

Dei vobem omniam proditiverunt.  Iam vobis quis deposcibitis sacrificium rersum vitae est!

Zeros'

  • Member
  • *
  • Posts: 1540
    • View Profile
(no subject)
« Reply #22 on: February 01, 2004, 10:59:57 AM »
haha...ive been away from TK so long im getting confused (haha thats funny huh?)
« Last Edit: December 31, 1969, 06:00:00 PM by Zeros' »
\"Runaway with my heart...
 Runaway with my hope...
 If I could make you mine...I\'ll go whereever you will go.\"

\"So lately, I\'ve been wondering...
 Who will be there to take my place...
 When I\'m gone, You\'ll need love...To light the shadows on your face.\"

\"If a great wave should fall...
 It would fall upon us...
 Well I hope there\'s someone out there...Who can bring me back to you.\"

\"Way up high or down low...I\'ll go wherever you will go.\"

\"Runaway with my love.\"

In your heart and mind, I\'ll stay with you all of time...

Haraldur

  • Member
  • *
  • Posts: 2860
    • View Profile
    • http://haraldur.mysticsoftware.net
(no subject)
« Reply #23 on: February 01, 2004, 11:15:08 AM »
Yeah... Laughing
« Last Edit: December 31, 1969, 06:00:00 PM by Haraldur »

DarkElite

  • Member
  • *
  • Posts: 1452
    • View Profile
    • http://cryosoft.mysticsoftware.net/Home.html
(no subject)
« Reply #24 on: February 01, 2004, 11:20:22 AM »
another question from Elite  Laughing  :

now the damn cursor wont work. the enemy coordinates are set into
enemyposX[1]! and enemyposY[1]!

 (the one can be a 2 or a variable to decide which enemy it is)

and the length and width are enemyX[1]! and enemyY[1]!

heres the cursor thingy

Code: [Select]
#savescreen()
#ene!=1
:enesel
#done!=0
#While (done!=0)
{
#eneX!=enemyposX[ene!]!-10
#eneY!=enemyY[ene!]!/2+enemyposY[ene!]!
#setimagetransparent("EneArrow.gif",eneX!,eneY!,10,15,255,255,255)
#Wait(enesel$)
#If (enesel$="LEFT")
{
#If (enemies!~=2){#Branch (:enesel)}
#If (ene!=2){#Branch (:enesel)}
#ene!=2
#RestoreScreen()
#Branch (:enesel)
}
#If (enesel$="RIGHT")
{
#If (ene!=1){#Branch (:enesel)}
#ene!=1
#RestoreScreen()
#Branch (:enesel)
}
#If (enesel$=back$)
{
#RestoreScreen()
#Branch (:attack)
}
#If (enesel$=confirm$)
{
}
} *for while
« Last Edit: December 31, 1969, 06:00:00 PM by DarkElite »
DarkElite

Dei vobem omniam proditiverunt.  Iam vobis quis deposcibitis sacrificium rersum vitae est!

Mark of the Dragon

  • Member
  • *
  • Posts: 1658
    • View Profile
    • http://www.geocities.com/zeroentity01/
(no subject)
« Reply #25 on: February 01, 2004, 12:18:00 PM »
Oh god...thank god im not gonna start a BS till school's out! Let me finish my programming classes first!
« Last Edit: December 31, 1969, 06:00:00 PM by Mark of the Dragon »
<center>
Roy Mustang



Yeah...that sounds like me <_<

<center>
You were born in the land of Warrior Pride. You live to fight, you have a strong spirit, courage and bravery. Strong lord! Unsheath thy sword, rush into war and strip the enemy of his flesh down to the core.


Umm...yeah

DarkElite

  • Member
  • *
  • Posts: 1452
    • View Profile
    • http://cryosoft.mysticsoftware.net/Home.html
(no subject)
« Reply #26 on: February 01, 2004, 03:23:37 PM »
got enery thing fixed out, but is there anyway to convert the pixel posittion to text position? like the place of an enemy is diffrent depending on the enemy, so i want to convert the picture placement into a text x y, so i can put down the damage and stuff like that
« Last Edit: December 31, 1969, 06:00:00 PM by DarkElite »
DarkElite

Dei vobem omniam proditiverunt.  Iam vobis quis deposcibitis sacrificium rersum vitae est!

Xorlak

  • Administrator
  • Member
  • *****
  • Posts: 2225
    • View Profile
    • http://darkagegames.net
(no subject)
« Reply #27 on: February 01, 2004, 04:26:45 PM »
Hmm, for a pixel to text coordinate conversion, divide the pixel coordinates by the font size (and to go the other way, multiply by the font size).  It's not perfect, but it should be pretty close (it works best with the Toolkit fonts, not true type).
« Last Edit: December 31, 1969, 06:00:00 PM by Xorlak »

DarkElite

  • Member
  • *
  • Posts: 1452
    • View Profile
    • http://cryosoft.mysticsoftware.net/Home.html
(no subject)
« Reply #28 on: February 02, 2004, 06:17:48 AM »
tk fonts? as in the "fixedsys" font, the orgiional font (i think its "base") or a custom font made with TK?
« Last Edit: December 31, 1969, 06:00:00 PM by DarkElite »
DarkElite

Dei vobem omniam proditiverunt.  Iam vobis quis deposcibitis sacrificium rersum vitae est!

Xorlak

  • Administrator
  • Member
  • *****
  • Posts: 2225
    • View Profile
    • http://darkagegames.net
(no subject)
« Reply #29 on: February 02, 2004, 01:00:42 PM »
Any font made using the Toolkit, i.e. #font("base.fnt")
« Last Edit: February 02, 2004, 01:01:24 PM by Xorlak »