This site requires JavaScript, please enable it in your browser!
Greenfoot back
mariq_rasyid29
mariq_rasyid29 wrote ...

2021/2/26

How making a 2 ways dialogue ?

1
2
danpost danpost

2021/3/2

#
Example: addObject(new Dialogue(dialog3), 300, 50);
mariq_rasyid29 mariq_rasyid29

2021/3/2

#
just input to Wolf Statue class, sir?
danpost danpost

2021/3/2

#
mariq_rasyid29 wrote...
just input to Wolf Statue class, sir?
Yes ... but with "getWorld()."...
mariq_rasyid29 mariq_rasyid29

2021/3/2

#
affimative
mariq_rasyid29 mariq_rasyid29

2021/3/3

#
mmmm but if im press e the dialogue cant removed still there in the world
danpost danpost

2021/3/3

#
mariq_rasyid29 wrote...
if im press e the dialogue cant removed still there in the world
Your code?
mariq_rasyid29 mariq_rasyid29

2021/3/4

#
here wolf statue code
public class WolfStatue extends Freature
{  String[] dialog3 =
     {
    "The Greatest of Alpha\n Blizzard Wolf Smith."
      };
    
    /**
     * Act - do whatever the WolfStatue wants to do. This method is called whenever
     * the 'Act' or 'Run' button gets pressed in the environment.
     */
    public void act() 
    {touch();
    }
    public void touch()
    {if(isTouching(Player.class))
        {adddialog();
    }
     
   }
    public void adddialog()
    { Dialogue dialogue3 = new Dialogue(dialog3);
        getWorld().addObject(dialogue3,230, 56);
    }
}
  
danpost danpost

2021/3/4

#
mariq_rasyid29 wrote...
if im press e the dialogue cant removed still there in the world
Your code?
Where you try to remove the dialogue ??
mariq_rasyid29 mariq_rasyid29

2021/3/4

#
idk what i must to put it
You need to login to post a reply.
1
2