Submit Your Article


 
RPG Maker

Welcome Guest ( Log In | Register )


  Games Resources RPG Maker VX RPG Maker XP Scripts Tutorials Downloads

 
Reply to this topicStart new topic
> Help with a couple of scripts, I can't get them to work right...
orcywoo6
post Nov 13 2010, 04:09 AM
Post #1


Black Mage
Group Icon

Group: Revolutionary
Posts: 130
Type: Event Designer
RM Skill: Advanced




I am making a little zombie application in game maker at the moment, I have some scripts but they arent working how I would like them to.

CODE
if random(20) < 1
direction += 90;
if random(20) < 1
direction -= 90;
if random(20) < 1
speed = 0;
if random(20) < 1
speed = 1;

Thats my random movement script, I was wondering if there was a way to make it smoother, because at the moment they turn way too fast, they literally flash to the next direction, and they change direction far too often.

I was also wondering how I can stop the zombies and humans overlapping each other, I have found a simple method but it makes them spaz all over the place and start shaking so if there was an alternative or a suggestion I would be happy happy.gif

Thanks in advance, i'm still learning.


__________________________
<a href="http://www.points2shop.com/?ref=orcywoo6"><img src="http://points2shop.com//banners/61353" border="0"/></a>

"Sorrow. How do you prove that you exist...? Maybe we don't exist..." - Vivi
<div style="margin:20px; margin-top:5px"><div style="margin-bottom:2px">[Show/Hide] Playstation Network</div><div style="margin: 0px; padding: 6px; border: 1px inset;"><div style="display: none;">Proud PS3 owner since my 360 betrayed me for the fourth and final time with RROD.
add me for a match or two if you want! :D

</div></div></div>
<div style="margin:20px; margin-top:5px"><div style="margin-bottom:2px">[Show/Hide] Can you read this?</div><div style="margin: 0px; padding: 6px; border: 1px inset;"><div style="display: none;">Cna yuo raed tihs? Olny 55% of plepoe can.
I cdnuolt blveiee taht I cluod aulaclty uesdnatnrd waht I was rdanieg. The phaonmneal pweor of the hmuan mnid, aoccdrnig to a rscheearch at Cmabrigde Uinervtisy, it dseno't mtaetr in waht oerdr the ltteres in a wrod are, the olny iproamtnt tihng is taht the frsit and lsat ltteer be in the rghit pclae. The rset can be a taotl mses and you can sitll raed it whotuit a pboerlm. Tihs is bcuseae the huamn mnid deos not raed ervey lteter by istlef, but the wrod as a wlohe. Azanmig huh? yaeh and I awlyas tghuhot slpeling was ipmorantt!
fi yuo cna raed tihs, palce it in yuor siantugre.</div></div></div>
Go to the top of the page
 
+Quote Post
   
darkyoshi
post Nov 19 2010, 12:55 AM
Post #2


o_O
Group Icon

Group: Revolutionary
Posts: 1,244
Type: None
RM Skill: Undisclosed




Sorry about the late reply, anyway...

You need to use a timer. An easy way is to use GM's built in timers, "alarms".

You can put that code you have in an alarm event and at the end do something like:
CODE
alarm[0]=30  //30=1 second
You will need to start it by using it in the create event as well.

________________________________________

You could also make your own timer.
CODE
changeTime+=1
if changeTime=30
{
  //put your code here
  changeTime=0
}

There's a bajillion ways to slow it down, these are just a few.


__________________________
Click to go to the Distorted Travesty thread.

Other Stuff

Voted "Best New Member of 2007"


Funny things people say

Pandemikk: "Please don't let your your homosexuality give you biased judgments on a person's artwork." -Source
Phantsmal: "In those times, China and Japan where very much alike. i'd say china because that's where most people knew martial arts,But i dunno." -Source

Normal IRC shenanegans

Some posts here make me feel kinda like this.
Go to the top of the page
 
+Quote Post
   
Oaken
post Nov 23 2010, 09:05 PM
Post #3


Level 7
Group Icon

Group: Member
Posts: 95
Type: Artist
RM Skill: Intermediate




Well, if you are trying to make a random, slow moving zombie you could just go to the event screen for them and look under the Autonomous movement box to the left. Then under type select random... Finally you could then go to Speed and set it as
Speed 2: X4 slower
and
Freq: Highest

I know this really wasnt what you are looking for... Im just no good with scripts and I wanted to help! tongue.gif


__________________________
Dont walk in my footsteps, I walk into walls...

Having prblems with RPG maker vx? feel free to PM me!
Go to the top of the page
 
+Quote Post
   
darkyoshi
post Nov 23 2010, 10:48 PM
Post #4


o_O
Group Icon

Group: Revolutionary
Posts: 1,244
Type: None
RM Skill: Undisclosed




Wrong program Oaken, you're thinking rpg maker.
We've already got it solved it seems anyway. tongue.gif


__________________________
Click to go to the Distorted Travesty thread.

Other Stuff

Voted "Best New Member of 2007"


Funny things people say

Pandemikk: "Please don't let your your homosexuality give you biased judgments on a person's artwork." -Source
Phantsmal: "In those times, China and Japan where very much alike. i'd say china because that's where most people knew martial arts,But i dunno." -Source

Normal IRC shenanegans

Some posts here make me feel kinda like this.
Go to the top of the page
 
+Quote Post
   
orcywoo6
post Nov 24 2010, 12:03 PM
Post #5


Black Mage
Group Icon

Group: Revolutionary
Posts: 130
Type: Event Designer
RM Skill: Advanced




Thanks very much thumbsup.gif

I will try it out once I get a chance to and post results smile.gif


__________________________
<a href="http://www.points2shop.com/?ref=orcywoo6"><img src="http://points2shop.com//banners/61353" border="0"/></a>

"Sorrow. How do you prove that you exist...? Maybe we don't exist..." - Vivi
<div style="margin:20px; margin-top:5px"><div style="margin-bottom:2px">[Show/Hide] Playstation Network</div><div style="margin: 0px; padding: 6px; border: 1px inset;"><div style="display: none;">Proud PS3 owner since my 360 betrayed me for the fourth and final time with RROD.
add me for a match or two if you want! :D

</div></div></div>
<div style="margin:20px; margin-top:5px"><div style="margin-bottom:2px">[Show/Hide] Can you read this?</div><div style="margin: 0px; padding: 6px; border: 1px inset;"><div style="display: none;">Cna yuo raed tihs? Olny 55% of plepoe can.
I cdnuolt blveiee taht I cluod aulaclty uesdnatnrd waht I was rdanieg. The phaonmneal pweor of the hmuan mnid, aoccdrnig to a rscheearch at Cmabrigde Uinervtisy, it dseno't mtaetr in waht oerdr the ltteres in a wrod are, the olny iproamtnt tihng is taht the frsit and lsat ltteer be in the rghit pclae. The rset can be a taotl mses and you can sitll raed it whotuit a pboerlm. Tihs is bcuseae the huamn mnid deos not raed ervey lteter by istlef, but the wrod as a wlohe. Azanmig huh? yaeh and I awlyas tghuhot slpeling was ipmorantt!
fi yuo cna raed tihs, palce it in yuor siantugre.</div></div></div>
Go to the top of the page
 
+Quote Post
   
Oaken
post Nov 26 2010, 02:20 PM
Post #6


Level 7
Group Icon

Group: Member
Posts: 95
Type: Artist
RM Skill: Intermediate




0.0 Oops! XD my mistake! I should have read the post better! Well, im glad that it worked out for you anyways!


__________________________
Dont walk in my footsteps, I walk into walls...

Having prblems with RPG maker vx? feel free to PM me!
Go to the top of the page
 
+Quote Post
   

Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 

Lo-Fi Version Time is now: 18th May 2013 - 03:40 PM
RPG RPG Revolution is an Privacy Policy and Legal
eXTReMe Tracker