User Tag List

Page 1 of 3 1 2 3 LastLast
Results 1 to 10 of 26

Thread: Moving Platforms

  1. #1
    Octorok Archangel's Avatar
    Join Date
    Apr 2008
    Age
    34
    Posts
    362
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    vBActivity - Stats
    Points
    1,732
    Level
    13
    vBActivity - Bars
    Lv. Percent
    94.83%

    Fire Breathing Aquamentus and Moving Platforms

    I was wondering if someone could make an aquamentus that breathes fire.

    Edit: I also need moving platforms that are 16x16 combos that carry link around the screen. I'm using changers by the way. :googly:
    -Archangel-
    Keeping the ZC Developers busy with heavy beta testing skills and experimentation is what I do best. May ZC be bug free!

    You should seriously check advmath.zh out if you use ZC.

  2. #2
    Lynel
    ZC Developer
    pkmnfrk's Avatar
    Join Date
    Jan 2004
    Location
    Toronto
    Age
    37
    Posts
    1,248
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    vBActivity - Stats
    Points
    3,142
    Level
    18
    vBActivity - Bars
    Lv. Percent
    10.59%
    Um, subject line and topic divergance?
    Tale of the Cave - a web comic - Updates Monday, Wednesday, Friday
    ZC Tutorials - Tutorials and Script Library - Updated July 30, 2008
    ZeldaGuard - Corruption in my save files? It's more likely than you think!
    I do script requests!

  3. #3
    Octorok Archangel's Avatar
    Join Date
    Apr 2008
    Age
    34
    Posts
    362
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    vBActivity - Stats
    Points
    1,732
    Level
    13
    vBActivity - Bars
    Lv. Percent
    94.83%

    Re: Moving Platforms

    Fixed... Smack to the face.
    -Archangel-
    Keeping the ZC Developers busy with heavy beta testing skills and experimentation is what I do best. May ZC be bug free!

    You should seriously check advmath.zh out if you use ZC.

  4. #4
    &&
    ZC Developer
    Joe123's Avatar
    Join Date
    Sep 2006
    Age
    32
    Posts
    3,061
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    vBActivity - Stats
    Points
    7,304
    Level
    26
    vBActivity - Bars
    Lv. Percent
    8.76%

    Re: Moving Platforms

    Code:
    ffc script Platform{
    	void run(){
    	int counterx; int countery;
    		while(true){
    			if(Abs(Link->X-(this->X+8*(this->TileWidth-1))) <= 8*this->TileWidth
    			&& Abs(Link->Y-(this->Y+8*(this->TileHeight-1))) <= 8*this->TileHeight){
    				Link->X += move(this->Vx,counterx);
    				Link->Y += move(this->Vy,countery);
    				counterx = (counterx+1)%(100/factors100(Abs(this->Vx)));
    				countery = (countery+1)%(100/factors100(Abs(this->Vy)));
    			}
    		Waitframe();
    		}
    	}
    	int move(int s,int c){
    		int as = Abs(s);
    		int ret;
    		if(as < 1){
    			if(c < as*100/factors100(as)) ret = 1;
    			else ret = 0;
    		}else if(as < 2){
    			if(c < (as-1)*100/factors100(as-1)) ret = 2;
    			else ret = 1;
    		}
    		if(s < 0) ret = -ret;
    		return ret;
    	}
    	int factors100(int s){
    		for(int i=50;i>0;i--) if((s*100)%i == 0) return i;
    	}
    }

  5. #5
    Octorok Christian's Avatar
    Join Date
    Dec 2008
    Age
    34
    Posts
    199
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    vBActivity - Stats
    Points
    740
    Level
    9
    vBActivity - Bars
    Lv. Percent
    56.8%
    How do you set this script up using your pit script?

  6. #6
    &&
    ZC Developer
    Joe123's Avatar
    Join Date
    Sep 2006
    Age
    32
    Posts
    3,061
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    vBActivity - Stats
    Points
    7,304
    Level
    26
    vBActivity - Bars
    Lv. Percent
    8.76%

    Re: Moving Platforms

    Move the 'Falling' boolean from the pit script outside of the script, and put a line inside the if in the while loop in this script that says 'Falling = false;'.

  7. #7
    Octorok Christian's Avatar
    Join Date
    Dec 2008
    Age
    34
    Posts
    199
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    vBActivity - Stats
    Points
    740
    Level
    9
    vBActivity - Bars
    Lv. Percent
    56.8%
    Ah , very simple.

    Thanks =)

  8. #8
    &&
    ZC Developer
    Joe123's Avatar
    Join Date
    Sep 2006
    Age
    32
    Posts
    3,061
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    vBActivity - Stats
    Points
    7,304
    Level
    26
    vBActivity - Bars
    Lv. Percent
    8.76%

    Re: Moving Platforms

    Yeah, I mean it's not perfect but I'd say it's acceptable.
    I'm quite proud of it though, took some thinking up.

  9. #9
    Octorok Archangel's Avatar
    Join Date
    Apr 2008
    Age
    34
    Posts
    362
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    vBActivity - Stats
    Points
    1,732
    Level
    13
    vBActivity - Bars
    Lv. Percent
    94.83%

    Re: Moving Platforms

    There's a slight problem with the script. It only moves link if he's facing the same direction as the platforms path of movement. Is it possible to correct this?
    -Archangel-
    Keeping the ZC Developers busy with heavy beta testing skills and experimentation is what I do best. May ZC be bug free!

    You should seriously check advmath.zh out if you use ZC.

  10. #10
    &&
    ZC Developer
    Joe123's Avatar
    Join Date
    Sep 2006
    Age
    32
    Posts
    3,061
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    vBActivity - Stats
    Points
    7,304
    Level
    26
    vBActivity - Bars
    Lv. Percent
    8.76%

    Re: Moving Platforms

    There is nothing related to direction in that code at all.

    Are you possibly walking against the direction of the platform?
    Surprisingly enough that might cause some problems.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
About us
Armageddon Games is a game development group founded in 1997. We are extremely passionate about our work and our inspirations are mostly drawn from games of the 8-bit and 16-bit era.
Social