Results 256 to 270 of 306
-
April 2nd, 2005, 03:43 PM #25610Registered User
postsRPG
Also, its nothing much but here is what im still working on. I just put it together, so it doesnt have the building command yet. Ive been working on it for school. Oh...well since its 800kb (lol) heres the .swf. Well this sucks. My files are to big...so ill post it on my website in a bit. lol sorry about this.
-
April 2nd, 2005, 04:35 PM #257
-
April 2nd, 2005, 04:38 PM #25810Registered User
postsWhat is confusing?
-
April 21st, 2005, 05:58 AM #259
i need someones help, do you know if this rpg will work on MX, because i made my movie on 2004 and im having trouble getting it to work on MX
-
April 21st, 2005, 06:12 AM #260
i also have another question for you guys, i made it so if you press space it swings the sword. all of the action script is right but it starts playing wehn you press space, but your guy must keep moving to keep the sword keep swinging
gar i know what is wrong i just dont know how to fix it... the action script that keeps the guy from moving constantly is keeping the sword from swinging on its own... is there any way to fix it with out changing him not moving constantly... hope you understand thatLast edited by shotmenot; April 21st, 2005 at 06:59 AM.
-
April 21st, 2005, 10:12 AM #261Hmm... Without looking at your code, I can't say for sure... though I did do something like that before - I had animation for the guy moving, and sword animation seperate...
Originally Posted by shotmenot
I beleive I had one MC with 2 Layers. On layer 1 was an MC which had the Guy's Sprite. That MC had 2 Frames - Stationary, and an Animated MC of the guy moving. The other layer had an MC of the sword with two animations: Stationary/Moving.
My code would then call each embedded MC depending on the key-pressed.... like... (and my code is not even going to be close to right)
Also, I think I had some attachMovie code set up for my sword_mc that would allow you to switch weapons. Play with it, I know I'm not giving you exact answers, but (hopefully) you should be able to figure it out.Code:if (arrowkey is pressed) { _root.guy_mc.move_mc.gotoandplay('walking'); } else { _root.guy_mc.move_mc.gotoandplay('stopped'); } if (attackKey is pressed) { _root.guy_mc.sword_mc.gotoandplay('swinging'); } else { _root.guy_mc.sword_mc.gotoandplay('stopped'); }
-
April 21st, 2005, 10:18 AM #262
the scripting i have is here... the sword and the guy are on the same layer and movie clip.. like it works with the swinging you just have to move the guy because the action script that says if no keys are press stop is blocking the animation
Code:onClipEvent (load) { walkSpeed = 6; stop(); } onClipEvent (enterFrame) { function checkCoords(x,y,direct){ guyTL = _root["tile_"+Math.floor((x-(_parent._width/2)+1)/_root.tileWdth)+"_"+Math.floor((y-(_parent._height/2)+1)/_root.tileHght)].barrier; guyTR = _root["tile_"+Math.floor((x+(_parent._width/2)-1)/_root.tileWdth)+"_"+Math.floor((y-(_parent._height/2)+1)/_root.tileHght)].barrier; guyBR = _root["tile_"+Math.floor((x+(_parent._width/2)-1)/_root.tileWdth)+"_"+Math.floor((y+(_parent._height/2)-1)/_root.tileHght)].barrier; guyBL = _root["tile_"+Math.floor((x-(_parent._width/2)+1)/_root.tileWdth)+"_"+Math.floor((y+(_parent._height/2)-1)/_root.tileHght)].barrier; switch(direct) { case 0: if (guyTL || guyTR) { return false; } case 1: if (guyBR || guyBL) { return false; } case 2: if (guyTR || guyBR) { return false; } case 3: if (guyTL || guyBL) { return false; } } return true; } if (Key.isDown(Key.UP)) { play(); _rotation = 180; if (checkCoords(_parent._x, _parent._y - walkSpeed,0)){ _parent._y-= walkSpeed; }} if (Key.isDown(key.RIGHT)) { play(); _rotation = 270; if (checkCoords(_parent._x + walkSpeed, _parent._y,2)){ _parent._x+= walkSpeed; } } if (Key.isDown(key.LEFT)) { play(); _rotation = 90; if (checkCoords(_parent._x - walkSpeed, _parent._y,3)){ _parent._x-= walkSpeed; }} if (Key.isDown(key.DOWN)) { play(); _rotation = 0; if (checkCoords(_parent._x, _parent._y + walkSpeed,1)){ _parent._y+= walkSpeed; } } if (!Key.isDown(key.UP) & !Key.isDown(key.DOWN) & !Key.isDown(key.LEFT) & !Key.isDown(key.RIGHT)) { stop(); } var name ="tile_"+Math.floor((_parent._x / _root.tileWdth))+"_"+(Math.floor(( _parent._y /_root.tileHght))); if (_root[name].isDoor) { _root.changeMap(_root[name].toMap,_root[name].guyX,_root[name].guyY); } else { _root.justMoved = false; }} on(keyPress"<space>"){ gotoAndPlay("guy", 7); }
-
April 21st, 2005, 10:36 AM #263You need to split them up. Make one MC that's of the sword not moving. Another of it moving, a 3rd MC of the guy not moving, and a 4th of the guy Moving.</space> Lets (hypothetically) name the first "swordStill", then "swordMove", then "guyStill", and "guyMove".
Originally Posted by shotmenot
Next, make another MC called: "sword_mc", and make 2 frames. In frame one, place "swordStill", and put the code "stop();".
In frame 2, put "swordMove", and again put "stop();"
Next, make a 6th MC, and name it "guy_mc", again, put 2 frames in it. Frame one should have the "guyStill", and frame 2 should have "guyMove", both with"stop();" as the code. Now, make one more MC, and name it "Guy", and make 2 layers. On one layer, place "sword_mc", and the other place "guy_mc". (doesn't matter which layer).
Now, your code to play the attack animation would look something like this:
and to end the animation say:Code:_root.Guy.sword_mc.gotoAndStop(2);
For movement, you would say:Code:_root.Guy.sword_mc.gotoAndStop(1);
and to stop moving you would say:Code:_root.Guy.guy_mc.gotoAndStop(2);
This makes it so that both moving, and attacking would be completely independent of each other, so that if one stops, the other won't, and vice versa.Code:_root.Guy.guy_mc.gotoAndStop(1);
<space> </space>
-
April 22nd, 2005, 01:07 PM #26410Registered User
postsSo how do i make it online? Am i able to make it so other people will be able to see other people?
-
April 22nd, 2005, 04:27 PM #265
one quick question at you SeiferTim how hard is it to alter your map maker tool to help me make maps.... the doing them hand way is getting old fast :\
-
May 4th, 2005, 12:42 PM #266
is it really difficult to program a monster in the rpg? one that will like follow you at first, then attack with random damage?
-
May 4th, 2005, 02:35 PM #267
Not really.. there are several ways to do it. The easiest way is just to make an enemy which is constantly attracted to the player... and moves like 5 steps towards the player every interval... and then when it hits the player, it deals damage, and explodes/dies/whatever... but if it hits the player's weapon, it dies without dealing damage. Use a lot of randoms, and hittests
Marz's tutorials on AI are a great help, too.
-
August 26th, 2005, 08:45 PM #268
ok, how can I make it so that if the person runs into the borders of the page(550, 400) the person wont go any further. Like a constraint in the startDrag() function, please help!?!?!?
-
August 26th, 2005, 10:39 PM #269
-
August 27th, 2005, 12:14 AM #270I'm sure that what nathan said works perfectlt for you and that you don't use startDrag() to move your character. But if you did, read this:
Originally Posted by cobrasniper555
startDrag()
Usage
startDrag(target:Object,[lock:Boolean, left:Number, top:Number, right:Number, bottom:Number]) : Void
Parameters
target The target path of the movie clip to drag.
lock A Boolean value specifying whether the draggable movie clip is locked to the center of the mouse position (true) or locked to the point where the user first clicked the movie clip (false). This parameter is optional.
left, top, right, bottom Values relative to the coordinates of the movie clip’s parent that specify a constraint rectangle for the movie clip. These parameters are optional.Proud Montanadian
We tolerate living and breathing. And niches.
Name Brand Watches
Maybe getTimer() or TweenMax is the answer to your problem . . .

Reply With Quote


Bookmarks