| Mirage Source http://miragesource.net/forums/ |
|
| Spell property http://miragesource.net/forums/viewtopic.php?f=201&t=4476 |
Page 1 of 1 |
| Author: | JadeCurt1ss [ Sun Sep 28, 2008 11:43 pm ] |
| Post subject: | Spell property |
I didn't know if I should combine the topic I posted about earlier, but at any rate here goes. I'm updating my spells list, so when you click on a spell, you get the corresponding icon you saved with it. I can do the calling of the icon, but its the saving of the icon data that gets me. So: Here's the code so far. a new picture box called picIconSP in modTypes (Client & server) Quote: SpellIcon As Long after Quote: SpellDone As Long .Now I updated the TCP of both Client and Server to this (Edit is at the end): Quote: Sub SendSaveSpell(ByVal SpellNum As Long) Call SendData("savespell" & SEP_CHAR & SpellNum & SEP_CHAR & Trim$(Spell(SpellNum).Name) & SEP_CHAR & Spell(SpellNum).ClassReq & SEP_CHAR & Spell(SpellNum).LevelReq & SEP_CHAR & Spell(SpellNum).Type & SEP_CHAR & Spell(SpellNum).Data1 & SEP_CHAR & Spell(SpellNum).Data2 & SEP_CHAR & Spell(SpellNum).Data3 & SEP_CHAR & Spell(SpellNum).MPCost & SEP_CHAR & Trim$(Spell(SpellNum).Sound) & SEP_CHAR & Spell(SpellNum).Range & SEP_CHAR & Spell(SpellNum).SpellAnim & SEP_CHAR & Spell(SpellNum).SpellTime & SEP_CHAR & Spell(SpellNum).SpellDone & SEP_CHAR & Spell(SpellNum).AE & SEP_CHAR & Spell(SpellNum).Big & SEP_CHAR & Spell(SpellNum).SpellIcon & SEP_CHAR & Spell(SpellNum).Element & END_CHAR) End Sub after Quote: SpellDone As Long .I added this into frmSpellEditor: This goes in Client's Handledata: Quote: Spell(n).SpellIcon = Val(parse(18)) This is in the server's Handledata: Quote: Spell(Spellnum).SpellIcon = Val(SpellData(18)) This is in modGameEditor: Quote: frmSpellEditor.Hscroll1.value = Spell.SpellIcon In frmMirage: Quote: picIconSP.picture = Spell(SpellNum)SpellIcon However... Nothing. I defined everything (I think) but It's not showing me the icon...) |
|
| Author: | Robin [ Mon Sep 29, 2008 5:36 pm ] |
| Post subject: | Re: Spell property |
What the hell is this? xD Code: picIconSP.picture = Spell(SpellNum)SpellIcon To load a picture, use the LoadPicture() function. Some something like this: Code: picIconSP.picture = LoadPicture(app.path & GFX_PATH & "\SpellIcon" & Spell(SpellNum).SpellIcon & ".jpg")
|
|
| Author: | JadeCurt1ss [ Tue Sep 30, 2008 2:54 am ] |
| Post subject: | Re: Spell property |
Except I wanted it to load the picture from the data that I saved. I might have forgot to include that. Let me look and I'll edit. Quote: his is in modGameEditor: frmSpellEditor.Hscroll1.value = Spell.SpellIcon see? So I need to load picture for this? |
|
| Author: | Robin [ Wed Oct 01, 2008 3:06 pm ] |
| Post subject: | Re: Spell property |
What picture? Look at your code, all you're storing in .PicIcon is a number. You need to then link that number to an image file on the person's harddrive. |
|
| Author: | JadeCurt1ss [ Wed Oct 01, 2008 11:31 pm ] |
| Post subject: | Re: Spell property |
My mistake Robin, I see how it works. Is the rest of the code syntaxed correctly? |
|
| Page 1 of 1 | All times are UTC |
| Powered by phpBB® Forum Software © phpBB Group https://www.phpbb.com/ |
|