+ Reply to Thread
Page 1 of 3 123 LastLast
Results 1 to 10 of 28

Thread: Wire Flash Game

  1. #1
    Wire Sofaking Ramishen's Avatar
    Join Date
    Jul 2007
    Location
    Where I live
    Posts
    419

    Default Wire Flash Game

    Hey I was just wondering if someone could point me in the direction of a tutorial, or tell me how I would go about making something like the Wire Mod Flash Game?

    I have a little experience in flash but I don't even know where to start on something like that.
    Quote Originally Posted by Schilcote View Post
    Do what I say, then tell me what happens.

  2. #2
    Wire Sofaking ZeikJT's Avatar
    Join Date
    Dec 2008
    Location
    California
    Posts
    1,391

    Default Re: Wire Flash Game

    Step 1 would be to figure out a networking system.

    Do you want it to be a globalized system, with a network table remembering which component should talk to which, or do you want a divded system, where each component has personal memory of which other component to talk with.

    This heavily affects how you would go about creating the system in any program.
    Against stupidity the Gods themselves contend in vain.
    -Friedrich Schiller

    The flame puts me in the mood to "Do it!".
    -Dart, Legend of Dragoon

  3. #3
    Wire Sofaking Ramishen's Avatar
    Join Date
    Jul 2007
    Location
    Where I live
    Posts
    419

    Default Re: Wire Flash Game

    I would say globalized. I would like to learn how to make, not necesarily chips, but things that I can drag and drop, then connect and have them send each other values.
    Quote Originally Posted by Schilcote View Post
    Do what I say, then tell me what happens.

  4. #4
    Wire Sofaking ZeikJT's Avatar
    Join Date
    Dec 2008
    Location
    California
    Posts
    1,391

    Default Re: Wire Flash Game

    You'd want to make handler functions then to interact with the network table and movie clips or buttons that merely activate the handlers and send basic info like what it was that was clicked.

    Depends on what version of flash you are using and if you will do it in ActionScript 2 or 3. This is a website I used heavily for method hunting that should help: kirupa.com - Flash and ActionScript Tutorials

    It doesn't have anything specific to what you want to create but a lot of things can be learned from it that can help. I'd suggest just sitting down and making some movie clips that register clicks and a network system that is notified after two clicks in a row and that begin sending data between them (if the two things clicked are valid).
    Against stupidity the Gods themselves contend in vain.
    -Friedrich Schiller

    The flame puts me in the mood to "Do it!".
    -Dart, Legend of Dragoon

  5. #5
    Wire Sofaking Ramishen's Avatar
    Join Date
    Jul 2007
    Location
    Where I live
    Posts
    419

    Default Re: Wire Flash Game

    That site helps a ton, *Adds to favorites*, but when you say networking, you just mean between two objects right? This is the area I'm having trouble with. If I used a system that updates with clicks I don't know how to toggle the sending of data to different targets, that and I don't know how to set up a system where code updates with clicks. I looked at that site for awhile but didn't see anything like that.
    Quote Originally Posted by Schilcote View Post
    Do what I say, then tell me what happens.

  6. #6
    Wire Sofaking ZeikJT's Avatar
    Join Date
    Dec 2008
    Location
    California
    Posts
    1,391

    Default Re: Wire Flash Game

    That's where the handlers come in. When the movie clip (I'm assuming you'll use them, they are fantastic) detects a mouse clip on it and runs a function accessible to all components (aka on the frame and not inside a movieclip).

    Quick example I whipped up to demo some techniques:

    This goes on frame1
    Code:
    _global.clickstate=0
    _global.comp1=null
    _global.comp2=null
    
    setvar = function(Comp,Var) {
    	//not yet, you figure it out xD
    }
    Click = function(Comp) {
    	if(_global.clickstate==0){
    		trace("Click1")
    		_global.clickstate=1
    		_global.comp1=Comp
    	}else if(_global.clickstate==1){
    		trace("Click2")
    		_global.clickstate=0
    		if(Comp!=_global.comp1){
    			trace("different components, linked!")
    			//do stuff, like organize a table with the two components
    		}else{
    			trace("same component, not linked.")
    		}
    	}
    	
    }
    This is for a new movie clip, make two or more if you want.
    Code:
    on (release) {
    	_root.Click(this._name)
    }
    EDIT: I'm still evolving this example code to be more of what you want, I.E. having the component table of linked entries etc.
    This is just a rough slice of an example.
    Last edited by ZeikJT; 02-23-2009 at 07:19 PM.
    Against stupidity the Gods themselves contend in vain.
    -Friedrich Schiller

    The flame puts me in the mood to "Do it!".
    -Dart, Legend of Dragoon

  7. #7
    Wire Sofaking Ramishen's Avatar
    Join Date
    Jul 2007
    Location
    Where I live
    Posts
    419

    Default Re: Wire Flash Game

    _global.clickstate=0
    _global.comp1=null
    _global.comp2=null
    setvar = function(Comp,Var) {
    //not yet, you figure it out xD
    }
    Click = function(Comp,Var) {
    if(_global.clickstate==0){
    trace("Click1")
    _global.clickstate=1
    _global.comp1=Comp
    }else if(_global.clickstate==1){
    trace("Click2")
    _global.clickstate=0
    if(Comp!=_global.comp1){
    trace("different components, linked!")
    this.Variable=Var*2;
    trace(Number(Variable));
    }else{
    trace("same component, not linked.")
    }
    }
    }
    So am I correct in thinking that I could replace the Var*2 with something like Var1*Var2? If so How would I get Var2? Using this won't it just write over Var1 from one object if I use another?
    That and, like I said, I am a flash noob and don't know what you mean for me to do in setvar=function(Comp,Var).
    Quote Originally Posted by Schilcote View Post
    Do what I say, then tell me what happens.

  8. #8
    Wire Sofaking ZeikJT's Avatar
    Join Date
    Dec 2008
    Location
    California
    Posts
    1,391

    Default Re: Wire Flash Game

    The setvar was just an example of another function.
    You can use something like it or not use it at all.

    In that changed code there will be problems:
    Code:
    this.Variable=Var*2;
    trace(Number(Variable));
    For one 'this' will probably not point to anything useful, it should pretty much only be used inside an object like a movie clip.
    The 'Var' isn't pointing to anything, you have to define it or retrieve it from somewhere.
    The trace(Number(Variable)) doesn't seem to do anything either as Variable isn't defined.
    Against stupidity the Gods themselves contend in vain.
    -Friedrich Schiller

    The flame puts me in the mood to "Do it!".
    -Dart, Legend of Dragoon

  9. #9
    Wire Sofaking Ramishen's Avatar
    Join Date
    Jul 2007
    Location
    Where I live
    Posts
    419

    Default Re: Wire Flash Game

    Quote Originally Posted by ZeikJT View Post
    For one 'this' will probably not point to anything useful, it should pretty much only be used inside an object like a movie clip.
    The 'Var' isn't pointing to anything, you have to define it or retrieve it from somewhere.
    The trace(Number(Variable)) doesn't seem to do anything either as Variable isn't defined.
    Not sure why I used this.Variable really.
    I didn't know what trace did before, but now I do, so I was just using it to show me whether or not it was multiplying Var by 2.
    Var came from the imput at the beggining of the function;
    Click = function(Comp,Var)
    You don't really need to define variables in flash before you use them right? I understand it is a good idea but I usually forget to or just slack off. XD Or did you just mean assign a value to which I did here; this.Variable=Var*2;
    Quote Originally Posted by Schilcote View Post
    Do what I say, then tell me what happens.

  10. #10
    Wire Sofaking ZeikJT's Avatar
    Join Date
    Dec 2008
    Location
    California
    Posts
    1,391

    Default Re: Wire Flash Game

    Quote Originally Posted by Ramishen View Post
    Not sure why I used this.Variable really.
    I didn't know what trace did before, but now I do, so I was just using it to show me whether or not it was multiplying Var by 2.
    Var came from the imput at the beggining of the function;
    Click = function(Comp,Var)
    You don't really need to define variables in flash before you use them right? I understand it is a good idea but I usually forget to or just slack off. XD Or did you just mean assign a value to which I did here; this.Variable=Var*2;
    Ah so that's what the this.Variable was for. Gotcha.
    When you stated talking about Var2 I thought that's what you used but Var is totally an acceptable variable to use if the function comes with it.

    Arrays are unique, so it's best if you define arrays before using. If you don't then sometimes trying to do a myArrary.length won't work and will spew out undefined. This way it returns 0 when it has not yet been used.

    Again, the code I posted was mostly just example syntax, you really shouldn't use it as a base. ^_^
    Against stupidity the Gods themselves contend in vain.
    -Friedrich Schiller

    The flame puts me in the mood to "Do it!".
    -Dart, Legend of Dragoon

+ Reply to Thread
Page 1 of 3 123 LastLast

Similar Threads

  1. Wire Mod Flash Game
    By -orb- in forum Wiremod General Chat
    Replies: 432
    Last Post: 07-28-2009, 07:27 AM
  2. Replies: 13
    Last Post: 11-29-2008, 05:38 PM
  3. -orb-'s flash game
    By PacmanG17 in forum Wiremod General Chat
    Replies: 3
    Last Post: 02-29-2008, 12:02 PM
  4. need wire flash help fast
    By oXoSwiveloXo in forum Wiremod General Chat
    Replies: 1
    Last Post: 01-07-2008, 09:39 AM
  5. Wire Flash Drive
    By b14d3r11 in forum Finished contraptions
    Replies: 8
    Last Post: 09-29-2007, 11:58 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
proceed-collector
proceed-collector
proceed-collector
proceed-collector
linguistic-parrots
linguistic-parrots
linguistic-parrots
linguistic-parrots