Jumbofile Posted August 5, 2013 Author Share Posted August 5, 2013 I would like to make it so if you click a button in the char creation screen it will pick the class.If you click the button that says mage you will be a mage.I need the code for this because i cant figure out how to do it. Link to comment Share on other sites More sharing options...
jcsnider Posted August 5, 2013 Share Posted August 5, 2013 What engine are you using? Link to comment Share on other sites More sharing options...
Stein Posted August 5, 2013 Share Posted August 5, 2013 It'll likely be a hardcoded system over a standard dynamic one as the dropdown box is. But it's really not that hard, a button will set the value for a variable which is the class chosen, and send that over instead of the dropdown box index. Link to comment Share on other sites More sharing options...
Jumbofile Posted August 6, 2013 Author Share Posted August 6, 2013 im using 3.0like i said i cant code i wouldnt know where to start. Link to comment Share on other sites More sharing options...
jcsnider Posted August 6, 2013 Share Posted August 6, 2013 Simply add the button to your frmMenu form in the character creation panel or whatever and in double click on the button to get into its code and simply put,newCharClass = 1newCharSprite = 0(replace 1 with whatever)And with that you can remove the dropdown list and go from there. If you make more buttons you just replace 1 with 2, 3, and so on.-JC Link to comment Share on other sites More sharing options...
Jumbofile Posted August 6, 2013 Author Share Posted August 6, 2013 what would i do with this since i got rid of cmbclass```If frmMenu.optMale.Value Then Call SendAddChar(frmMenu.txtCName, SEX_MALE, frmMenu.cmbClass.ListIndex + 1, newCharSprite) Else Call SendAddChar(frmMenu.txtCName, SEX_FEMALE, frmMenu.cmbClass.ListIndex + 1, newCharSprite) End If End If``` Link to comment Share on other sites More sharing options...
jcsnider Posted August 6, 2013 Share Posted August 6, 2013 Replace frmMenu.cmbClass.ListIndex + 1 with newCharClass Link to comment Share on other sites More sharing options...
Jumbofile Posted August 6, 2013 Author Share Posted August 6, 2013 it says it cant find newCharClass Link to comment Share on other sites More sharing options...
jcsnider Posted August 6, 2013 Share Posted August 6, 2013 Weird, I must have an editted 3.0 I am looking at. Anyways, findPublic newCharSprite As Longand add this belowPublic newCharClass As Long Link to comment Share on other sites More sharing options...
Jumbofile Posted August 6, 2013 Author Share Posted August 6, 2013 what do i do about this```frmMenu.cmbClass = clearFor i = 1 To Max_Classes frmMenu.cmbClass.AddItem Trim$(Class(i).Name) Next frmMenu.cmbClass.ListIndex = 0 n = frmMenu.cmbClass.ListIndex + 1 newCharSprite = 0``` Link to comment Share on other sites More sharing options...
jcsnider Posted August 6, 2013 Share Posted August 6, 2013 Remove it all with the exception of that last line, newCharSprite = 0 Link to comment Share on other sites More sharing options...
Jumbofile Posted August 6, 2013 Author Share Posted August 6, 2013 ``` If frmMenu.optMale.Value = True Then Sprite = Class(frmMenu.cmbClass.ListIndex + 1).MaleSprite(newCharSprite) Else Sprite = Class(frmMenu.cmbClass.ListIndex + 1).FemaleSprite(newCharSprite) End If```do i delete this too Link to comment Share on other sites More sharing options...
jcsnider Posted August 6, 2013 Share Posted August 6, 2013 Nope edit it to this…```If frmMenu.optMale.Value = True Then Sprite = Class(newCharClass).MaleSprite(newCharSprite) Else Sprite = Class(newCharClass).FemaleSprite(newCharSprite) End If``` Link to comment Share on other sites More sharing options...
Jumbofile Posted August 6, 2013 Author Share Posted August 6, 2013 it just says connect, sending character addition Link to comment Share on other sites More sharing options...
Jumbofile Posted August 7, 2013 Author Share Posted August 7, 2013 what do i do with this?```If frmMenu.cmbClass.ListIndex = -1 Then Exit Sub``` Link to comment Share on other sites More sharing options...
jcsnider Posted August 7, 2013 Share Posted August 7, 2013 If newCharclass = 0 then exit sub Link to comment Share on other sites More sharing options...
Jumbofile Posted August 8, 2013 Author Share Posted August 8, 2013 Im dumbfounded.it did this for 6 hours![](http://i.imgur.com/7uppVtT.png) Link to comment Share on other sites More sharing options...
jcsnider Posted August 8, 2013 Share Posted August 8, 2013 Was there an error on the server or when you closed the client and re-opened did you have your character? Link to comment Share on other sites More sharing options...
Jumbofile Posted August 8, 2013 Author Share Posted August 8, 2013 its not giving an error, its just stays on stays at that point.I tried reopening but i dint have a character Link to comment Share on other sites More sharing options...
jcsnider Posted August 8, 2013 Share Posted August 8, 2013 Alright its broke then XD. If you want to zip up your source (server and client) and pm it to me I will see whats wrong and tell you what to do to fix it. Link to comment Share on other sites More sharing options...
Jumbofile Posted August 8, 2013 Author Share Posted August 8, 2013 ok i think i found the problem.I guess i had a typo in my classes file.It was supposed to be sprite = 2 but it was sprite = 22 so i could find a sprite and gave the error.Its fixed thank you for helping. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now