Play the games, create the levels

Topic, Game "Path 4 Mouse (old)"

Checkout our iPhone & iPad games!

You must register or log in to post a message.

Hexicube 14 years ago
  That causes the lag problem, i'll make a fla and send you it to show you how to fix that :)
geckojsc 14 years ago
  Yes. That's how it works.
Hexicube 14 years ago
  I just remembered:
In the game, are all the blocks inside one block and you use gotoAndstop to change the block?
[edit] Lol you're back :)
geckojsc 14 years ago
  Nope I was sleeping the whole time! (Actually I was at my friend's house. We went to a car-boot sale and I got a neat little Yamaha keyboard for £5!) Bargain!
Hexicube 14 years ago
  Are you awake yet geckojsc?
Hexicube 14 years ago
  OK, see you tomorrow :D
[edit] Remember to check the PM box :D
geckojsc 14 years ago
  Ok. I've got to go now. You can expect an update to the game (after two months of laziness) tomorrow!
Hexicube 14 years ago
  I'll PM you the code once I find out what 'radius' is, and you can use it if you want.
geckojsc 14 years ago
  But I will try working on my own way of moving the blocks. Don't worry about helping me, I will ask if I am really stuck. :)
Hexicube 14 years ago
  I still have it :)
geckojsc 14 years ago
  I got rid of it.
I hope marc still has the code in his PM box (he should have it).
Captain_404 14 years ago
  Hey, you know maybe there's a reason I pm'd it to you instead of posting it here?
Hexicube 14 years ago
  Gecko, i'm finding out what 'char' is...
[edit in reply to your edit2] Me 2!
metaknight91 14 years ago
  nice math. i never would have been able to do that :) you're smart.
geckojsc 14 years ago
  Hmm. This works ok, and there is very little maths involved:
this.origX=this._x
this.origY=this._y
this.onEnterFrame=function(){
if(this.hitTest(_root.circle)){
this._x -= (_root._xmouse-_x)/10;
} else {
this._x += (this.origX-_x)/10;
}
if(this.hitTest(_root.circle)){
this._y -= (_root._ymouse-_y)/10;
} else {
this._y += (this.origY-_y)/10;
}
}
[edit] Didn't see your edit! Thanks! :)
[edit2] Hmm, too complex for me (I bet I sound pathetic LOL). I don't know how to apply the code. I don't think it works with the way I make the tiles do stuff.
Hexicube 14 years ago
  I noticed the jumpiness, and have also asked captain_404 for the code about 15 minutes ago...
[edit] This is it:
//so is the block being pushed
//ccl is the circle that follows the mouse

[edit gecko]
Code removed (Captain's request)
geckojsc 14 years ago
  Hmm, your code works, but it is very jumpy-ish for me.
I'll try making it my way, then resort to yours if all else fails.
Hexicube 14 years ago
  Gecko, i've already done it, it's:
this.origX=this._x
this.origY=this._y
this.onEnterFrame=function()
{
this.xDist=this._x-this.origX
this.yDist=this._y-this.origY
this._x-=this.xDist/5
this._y-=this.yDist/5
this.xDist=_root._xmouse-this._x
this.yDist=_root._ymouse-this._y
this.distance=Math.sqrt((this.xDist*this.xDist)+(this.yDist*this.yDist))
if(this.distance<50)
{
if(xDist>0)
this._x-=(50-this.xDist)/5
else
this._x+=(50+this.xDist)/5
if(yDist>0)
this._y-=(50-this.yDist)/5
else
this._y+=(50+this.yDist)/5
}
}
geckojsc 14 years ago
  No, it's not hard. (it will be fake-ish)
If the block is within a certain distance of the mouse, it moves away from the mouse, and if it is not, it moves back towards its place. Pretty simple, but effective (it won't be as realistic as the real push, but will product the same effect).
I don't know about the exploding tiles. I'll leave it until later, and try to find my own way of doing it, if I do it at all.
Hexicube 14 years ago
  That's a bit hard to do, unless you know math, specifically trigonometry...
[edit] I could work that out while you put my code in :)
[re-edit] It's being troubesome O_O
Submarine95 14 years ago
  with 'just like push' you meant if you left-click the wall would move?
geckojsc 14 years ago
  I just had a great idea!
A Push-style block. It moves away from the mouse if it is within range, just like Push! :D
Hexicube 14 years ago
  For my exploding tile code, mine goes:
if(numHold==17) //Might be different number
{
//stuff to use
}
[edit]
Put this in for exploding tiles:
block.xHold = this._x/tileWidth] =attachMovie("fire", "wall"+(this.xHold-1)+":"+(this.yHold+0)+"b", _root.getNextHighestDepth(), {_x:this.xHold*20+40, _y:this.yHold*20}) =attachMovie("fire", "wall"+(this.xHold-1)+":"+(this.yHold+0)+"b", _root.getNextHighestDepth(), {_x:this.xHold*20-40, _y:this.yHold*20}) =attachMovie("fire", "wall"+(this.xHold-1)+":"+(this.yHold+0)+"b", _root.getNextHighestDepth(), {_x:this.xHold*20, _y:this.yHold*20+40}) =attachMovie("fire", "wall"+(this.xHold-1)+":"+(this.yHold+0)+"b", _root.getNextHighestDepth(), {_x:this.xHold*20, _y:this.yHold*20-40}) =attachMovie("fire", "wall"+(this.xHold-1)+":"+(this.yHold+0)+"b", _root.getNextHighestDepth(), {_x:this.xHold*20+20, _y:this.yHold*20+20}) =attachMovie("fire", "wall"+(this.xHold-1)+":"+(this.yHold+0)+"b", _root.getNextHighestDepth(), {_x:this.xHold*20+20, _y:this.yHold*20-20}) =attachMovie("fire", "wall"+(this.xHold-1)+":"+(this.yHold+0)+"b", _root.getNextHighestDepth(), {_x:this.xHold*20-20, _y:this.yHold*20+20}) =attachMovie("fire", "wall"+(this.xHold-1)+":"+(this.yHold+0)+"b", _root.getNextHighestDepth(), {_x:this.xHold*20-20, _y:this.yHold*20-20}) .isBomb) _root["wall"+(this.xHold+2)+":"+(this.yHold+0)].delay() .erasable!=false) _root["wall"+(this.xHold+2)+":"+(this.yHold+0)].vis = false .isBomb) _root["wall"+(this.xHold-2)+":"+(this.yHold+0)].delay() .erasable!=false) _root["wall"+(this.xHold-2)+":"+(this.yHold+0)].vis = false .isBomb) _root["wall"+(this.xHold+0)+":"+(this.yHold+2)].delay() .erasable!=false) _root["wall"+(this.xHold+0)+":"+(this.yHold+2)].vis = false .isBomb) _root["wall"+(this.xHold+0)+":"+(this.yHold-2)].delay() .erasable!=false) _root["wall"+(this.xHold+0)+":"+(this.yHold-2)].vis = false .isBomb) _root["wall"+(this.xHold+1)+":"+(this.yHold+1)].delay() .erasable!=false) _root["wall"+(this.xHold+1)+":"+(this.yHold+1)].vis = false .isBomb) _root["wall"+(this.xHold+1)+":"+(this.yHold-1)].delay() .erasable!=false) _root["wall"+(this.xHold+1)+":"+(this.yHold-1)].vis = false .isBomb) _root["wall"+(this.xHold-1)+":"+(this.yHold+1)].delay() .erasable!=false) _root["wall"+(this.xHold-1)+":"+(this.yHold+1)].vis = false .isBomb) _root["wall"+(this.xHold-1)+":"+(this.yHold-1)].delay() .erasable!=false) _root["wall"+(this.xHold-1)+":"+(this.yHold-1)].vis = false =attachMovie("fire", "wall"+(this.xHold-1)+":"+(this.yHold+0)+"b", _root.getNextHighestDepth(), {_x:this.xHold*20-20, _y:this.yHold*20}) =attachMovie("fire", "wall"+(this.xHold+1)+":"+(this.yHold+0)+"b", _root.getNextHighestDepth(), {_x:this.xHold*20+20, _y:this.yHold*20}) = attachMovie("fire", "wall"+(this.xHold+0)+":"+(this.yHold-1)+"b", _root.getNextHighestDepth(), {_x:this.xHold*20, _y:this.yHold*20-20}) = attachMovie("fire", "wall"+(this.xHold+0)+":"+(this.yHold+1)+"b", _root.getNextHighestDepth(), {_x:this.xHold*20, _y:this.yHold*20+20}) = attachMovie("fire", "wall"+(this.xHold+0)+":"+(this.yHold-0)+"b", _root.getNextHighestDepth(), {_x:this.xHold*20, _y:this.yHold*20}) .isBomb) _root["wall"+(this.xHold-1)+":"+(this.yHold+0)].delay() .erasable!=false) _root["wall"+(this.xHold-1)+":"+(this.yHold+0)].vis = false .isBomb) _root["wall"+(this.xHold+1)+":"+(this.yHold+0)].delay() .erasable!=false)_root["wall"+(this.xHold+1)+":"+(this.yHold+0)].vis = false .isBomb) _root["wall"+(this.xHold+0)+":"+(this.yHold+1)].delay() .erasable!=false)_root["wall"+(this.xHold+0)+":"+(this.yHold+1)].vis = false .isBomb) _root["wall"+(this.xHold+0)+":"+(this.yHold-1)].delay() .erasable!=false)_root["wall"+(this.xHold+0)+":"+(this.yHold-1)].vis = false
this._visible = false
}
}
[re-edit] fixed up text
vis was used for visibility, just put RemoveMovieClip() instead :)
geckojsc 14 years ago
  ???
What are you trying to say?
Is there a bug in the tile code or something? It helps if I know what I'm trying to fix... :)
Hexicube 14 years ago
  I noticed how you set the tile code, just get rid of the first 2 lines and the last tile so it works correctly :)
geckojsc 14 years ago
  Nope. I don't know if I'm going to add it (I probably won't). I've not been doing much Flash stuff recently. I have to be in the mood for it. (which I haven't been lately) but don't worry, I'll get back to it soon! *opens up Flash*
Hexicube 14 years ago
  We can't tell yet...
Gecko, is the exploding tile in yet?
DragonPower 14 years ago
  When will this game be out?...=(
Treazer 14 years ago
  @HAL
You can't play it because you aren't a tester -.-
HI_AB_LM 14 years ago
  geckojsc, why this game have levels, but isn't uploaded??

PS: why i can't play it and other people yes??

Games forum

Play Game "Path 4 Mouse (old)"

First post of the topic

geckojsc 15 years ago
  -= PATH 4 MOUSE =-

Here's the five most-recent Path4Mouse Twitter entries:

Our free flash games   Games for your site   Games for your iPhone   Contact   Twitter @jpsarda & @bonuslevelorg