About Store Forum Documentation Contact



Post Reply 
i dunno seriously[SOLVED]
Author Message
Psylixiri Offline
Member

Post: #1
i dunno seriously[SOLVED]
im currently trying to make an actionslotchooser work but ive run across someting weird.
ive put my actionslotchooser to apear when being created and so when i click everywhere it hide went to hide.
n i dont want that.. i actually want it to show when clicking on a skill.
n ive looked everywhere for a the hide if it isnt hidden where arent supose to n so no.

oh n ive noticed someting abnormal.. is that my chooser had like a region style on it while i actually never set it one esenthel should fix that
Code:
void SkillGui::update()
{
    if(Ms.bp(0))
    {    
        ATTACKS attack;
        if(Gui.ms()==attacks[FIREBALL]){attack=FIREBALL;}
        if(Gui.ms()==attacks[ICEBALL]) {attack=ICEBALL ;}
            showChooser();
            if(Ms.bp(0))
            {
                ACTION_SLOTS A_SLOT;
                if(Gui.ms()==slots[ACTION_SLOT_1]){A_SLOT=ACTION_SLOT_1;}
                if(Gui.ms()==slots[ACTION_SLOT_2]){A_SLOT=ACTION_SLOT_2;}
                if(Gui.ms()==slots[ACTION_SLOT_3]){A_SLOT=ACTION_SLOT_3;}
                if(Gui.ms()==slots[ACTION_SLOT_4]){A_SLOT=ACTION_SLOT_4;}
                if(Gui.ms()==slots[ACTION_SLOT_5]){A_SLOT=ACTION_SLOT_5;}
                if(Gui.ms()==slots[ACTION_SLOT_6]){A_SLOT=ACTION_SLOT_6;}
                if(Gui.ms()==slots[ACTION_SLOT_7]){A_SLOT=ACTION_SLOT_7;}
                if(Gui.ms()==slots[ACTION_SLOT_8]){A_SLOT=ACTION_SLOT_8;}
                //if(Gui.ms()==slots[ACTION_SLOT_9]){A_SLOT=ACTION_SLOT_9;}
                //if(Gui.ms()==slots[ACTION_SLOT_0]){A_SLOT=ACTION_SLOT_0;}
                ActionGui actGui;
                actGui.setGui(attack, A_SLOT);
                hideChooser();
            }        
    }
}
Code:
void SkillGui::showChooser()
{
   slotchooserwindow.show();
}
void SkillGui::hideChooser()
{
   slotchooserwindow.hide();
}
Code:
void SkillGui::createChooser()
{
   slotchooserwindow.replaceWindow<SkillWindow>(); slotchooserwindow.load("gui/action_slot_chooser.gobj"); slotchooserwindow.hide(); Gui+=slotchooserwindow;

   //Window &window=slotchooserwindow.getWindow("gui/action_slot_chooser.gobj");
   //window.move(Vec2(D.w()-0.05f-window.rect.max.x, 0));

   slots[ACTION_SLOT_1]=&slotchooserwindow.getButton("slot_1");
   slots[ACTION_SLOT_2]=&slotchooserwindow.getButton("slot_2");
   slots[ACTION_SLOT_3]=&slotchooserwindow.getButton("slot_3");
   slots[ACTION_SLOT_4]=&slotchooserwindow.getButton("slot_4");
   slots[ACTION_SLOT_5]=&slotchooserwindow.getButton("slot_5");
   slots[ACTION_SLOT_6]=&slotchooserwindow.getButton("slot_6");
   slots[ACTION_SLOT_7]=&slotchooserwindow.getButton("slot_7");
   slots[ACTION_SLOT_8]=&slotchooserwindow.getButton("slot_8");
   slotchooserwindow.show();
}
(This post was last modified: 02-09-2012 01:44 AM by Psylixiri.)
01-29-2012 01:16 AM
Find all posts by this user Quote this message in a reply
TBJokers Offline
Member

Post: #2
RE: i dunno seriously
if(Ms.bp(0))
{
ATTACKS attack;
if(Gui.ms()==attacks[FIREBALL]){attack=FIREBALL;}
if(Gui.ms()==attacks[ICEBALL]) {attack=ICEBALL ;}

if i understand correctly.. switch these.

if(Gui.ms()==attacks[FIREBALL]){
if(Ms.bp(0)){
attack=FIREBALL;
}
}

Man, it's always that semicolon...
01-29-2012 03:06 AM
Visit this user's website Find all posts by this user Quote this message in a reply
Psylixiri Offline
Member

Post: #3
RE: i dunno seriously
(01-29-2012 03:06 AM)TBJokers Wrote:  if(Ms.bp(0))
{
ATTACKS attack;
if(Gui.ms()==attacks[FIREBALL]){attack=FIREBALL;}
if(Gui.ms()==attacks[ICEBALL]) {attack=ICEBALL ;}

if i understand correctly.. switch these.

if(Gui.ms()==attacks[FIREBALL]){
if(Ms.bp(0)){
attack=FIREBALL;
}
}

omg that work lol
and i dont even understand whats my error infact it seem the same syntax...
01-29-2012 03:40 AM
Find all posts by this user Quote this message in a reply
Psylixiri Offline
Member

Post: #4
RE: i dunno seriously
im still trying to make that function work and now im stuck because of the constant update i cant seem to be able to make 2 step until the update happen and then reset
and if i separate the function in 2 i cant seem to find an alternative way to manually update the other
because when it seem when i use function starting with
Code:
while(Timer - Time.rd())
it seem to freeze the game instead
and just a question while your watching whats doe
Code:
super::update
do?

but the only thing ive tot to do yet is open Gui with specificate array of button for speficate slots for each array of spells to hide n show but.. lol ive never seen that in a game thats pretty much primitive isnt it lol
(This post was last modified: 01-31-2012 07:37 PM by Psylixiri.)
01-31-2012 07:24 PM
Find all posts by this user Quote this message in a reply
TBJokers Offline
Member

Post: #5
RE: i dunno seriously
I don't understand what's wrong, but maybe you put it wrong in your update function.. maybe you reset the values again which makes it show just 1fps? not sure

Man, it's always that semicolon...
02-02-2012 12:50 AM
Visit this user's website Find all posts by this user Quote this message in a reply
Psylixiri Offline
Member

Post: #6
RE: i dunno seriously[SOLVED]
oh ive fixed it its ok ...i had to separate the code in 2 updating section then set an image according to the skill because thats would be stupid to stop the game update while switching skill.. obviously.. lol
(This post was last modified: 02-09-2012 01:41 AM by Psylixiri.)
02-09-2012 01:40 AM
Find all posts by this user Quote this message in a reply
Post Reply