The Editor

Hey again, i was looking over my coding and thought it would be easier if i tried to create a Deck Editor before the Dueling system, so i just got something started...here is what i have so far

var
    BuildDeck=""

var
    Build=""

mob
    verb
        BuildDeck()
            set category = "Commands"
            BuildDeck=input("Do you wish to build a deck?","Deck Builder") in list ("Sure","Not now")
            Startbuild()
proc
    Startbuild()
        switch(BuildDeck)
            if("Sure")
                winshow(usr,"Deckedit",2)
            if("Not now")
                return

proc/Shuffle(list/deck)
  for(var/i=deck.len,i>1,--i)
    deck.Swap(i, rand(1,i))



thats just a beggining Code although, and the problem is when ever i use the command or verb BuildDeck, the input pops up and such..but after nothing happens..as if it was an empty command


Big Problem

Posted by Sasuke_Uchiha_Chan on Sunday, September 21, 2008 08:41AM - 0 comments / Members say: yea +0, nay -0

Need Help

Hello byond, i am Sasuke, i am also known by Saito. Anyways i created this topic because i needed help with a small project i was working on. Project/game, same thing. The name of the project is Cards Of Destruction.

It is supposed to be a somewhat prodigy to the famous Yu Gi Oh francise except, not only with Yu Gi Oh cards. Some may be bleach and mixed with other animes, it depends. Although i am a beginner Coder and i have been starting on it.

So far i have 10+ cards, a small testing map, (grass,water)a Stat panel, inventory tab,actions tab,commands tab, options tab and Staff tab. I also added a Duel verb..the duel verb is a basic input in which when your dueling an online opponet, it freezes you, but allows you to execute actions, you will find this in almost any Yu Gi Oh game on byond.

Although along with the freeze effect, there is an effect that pushes the screen forward, which is very interesting. Anyways, i need help on creating certain things, such as when players are dueling they get to use the whole field to their advantage..so far when players play a card, it flies out in front of them only,

Here is a small look at the coding i made.

var
    Duel=""


            
mob/var
    frozen

mob/Move()
    if(!frozen)
        return..()



mob/verb //Verb that begins the game.
    Duel()
        Duel=input("Do you want to duel?","Duel Choice") in list("yes","no")
        StartDuel()

proc
    StartDuel()//Starts a new game and picks the person to be "it" for the corrosponding game
        switch(Duel)
            if("yes")
                world << " [usr] is starting a duel!" e
                usr.frozen=1 //Immobilizes it
            if("no")
                return


proc/Shuffle(list/deck)
  for(var/i=deck.len,i>1,--i)
    deck.Swap(i, rand(1,i))



There are very few errors, the main one is that when you start the duel or use the duel verb, you cant unfreeze your self, and would have to relog[Etc.] that is one thing i need help on, the other thing is the Field playing, as i said before players can only play cards in one direction, which is forward, and the card is able to be walked on and picked up as an item, here is the code i used

obj/Cards
    verb
        Get()
            set category="Commands"
            set src in oview(1)
            src.Move(usr)
            usr << "You pickup [src]!"
        Drop()
            set category="Commands"
            set src in usr
            src.Move(usr.loc)
            usr << "You drop [src]"




Please, i need alot of help, you can contact me at sasuke-kun23@live.com ^_^, please read and bring to your fullest attentions

Here is an Addition to the code i just added

mob
    var
        induel = 0

    verb
        startduel()
            induel = 0
            var/mob/challenged = input("challenge who?","Duel") as mob in world
            if(challenged.induel == 0)
                var/duel = alert(challenged,"Do you want to duel [src]?","Duel","Yes","No")
                if(duel == "Yes")
                    challenged.induel = 1
                    src.loc = locate(1,1,1) // !CHANGE THIS!
                    challenged.loc = locate(2,2,1) // !CHANGE THIS!
                    src.verbs -= /mob/verb/startduel
                    challenged.verbs -= /mob/verb/startduel
                else
                    alert(src,"sorry [challenged] does not want to duel","Duel")
                    induel = 0
                    return
            else
                alert(src,"sorry [challenged] is allready in a duel","Duel")
                induel = 0
                return

Posted by Sasuke_Uchiha_Chan on Monday, September 08, 2008 08:01PM - 1 comment / Members say: yea +0, nay -0
(Edited on Saturday, September 13, 2008 09:01AM)

 

Sasuke_Uchiha_Chan

Joined: Apr 22, 07

Email

Blog Calendar

September 2008
Su Mo Tu We Th Fr Sa
  1 2 3 4 5 6
7 8 9 10 11 12 13
14 15 16 17 18 19 20
21 22 23 24 25 26 27
28 29 30