This is a read-only archive of the old Scratch 1.x Forums.
Try searching the current Scratch discussion forums.

#1 2009-10-27 16:48:13

Steora12
Scratcher
Registered: 2009-06-24
Posts: 5

Warriors cat game technical difficulties.

Ok so I am making a warriors game I am having some technical difficulties.
Like I cannot make it impossible for the main charector to walk over water or walk on top of the great oak.
And the biggest problem is it can also walk past obsicals that are not supposed to be gone pas like thorns.

I keep trying to get it to stop but I am still new to programming on scratch so I still just
can not see how to do it.

So if anyone can help I would love to know how the heck I can stop the main cat from walking over the great oak and walking on water like the cats version of jesus.


Oh and if its not too much trouble it would be nice to see the programming blocks if possible.


>~steora~<

Offline

 

#2 2009-10-27 21:59:01

Ralphjos
Scratcher
Registered: 2009-10-10
Posts: 100+

Re: Warriors cat game technical difficulties.

I'm not sure if you want the cat to die when touching the water, or to not be allowed to go past it,
so I created one for both, (Pick one):

http://i38.tinypic.com/25g9dfa.gif

Great oak: Please specify in more detail

What is happening, what do you want to happen...

For thornes:
I was in a bit of a rush, so it's not the best I could do... If this doesnt help then sorry but this is what I did:

http://i37.tinypic.com/qwy5aa.gif

Replace this with your own script but leave in the Broadcasts

http://i33.tinypic.com/35jicqv.gif

EDIT: Click the images to see a better view

    Regards,
       Ralphj
os

Last edited by Ralphjos (2009-10-27 22:00:03)


http://i33.tinypic.com/2dt3j9j.gif

Offline

 

#3 2009-10-28 19:01:16

Locomule
Scratcher
Registered: 2009-08-24
Posts: 500+

Re: Warriors cat game technical difficulties.

Ralphjos did a lot of work explaining the "if touching" method. Just to make sure you understand, this method detects if sprite "cat" (or whatever you call it) is touching sprite "thorns", "water", "oak", etc. But hey, I see you have the project Cube World in your favorites. Download that script and examine how it does collision detection (hint: notice the greyish colored line at the bottom of the players square sprite) It is detecting If (this color) is touching (that color)

There are other methods too. If your game is not a scroller, you could check the players x,y positions, thereby defining square areas they either could not go into or that would trigger some action (ie. if the player enters the water, they drown, etc)

But mainly you need to upload what you have scripted so far so we have a better idea what to suggest for your particular needs. Peace!


aka Pain from DragonSpires, Delrith Online, BotBattle, Urban Dead etc etc lol

Offline

 

#4 2009-10-28 20:44:40

Ralphjos
Scratcher
Registered: 2009-10-10
Posts: 100+

Re: Warriors cat game technical difficulties.

Locomule wrote:

Ralphjos did a lot of work

Aww, thank you!!!  big_smile

    Regards,
       Ralphj
os


http://i33.tinypic.com/2dt3j9j.gif

Offline

 

#5 2009-10-29 04:06:24

Locomule
Scratcher
Registered: 2009-08-24
Posts: 500+

Re: Warriors cat game technical difficulties.

Hey no prob, you deserve more credit than that imho  smile


aka Pain from DragonSpires, Delrith Online, BotBattle, Urban Dead etc etc lol

Offline

 

#6 2009-10-29 16:28:31

Steora12
Scratcher
Registered: 2009-06-24
Posts: 5

Re: Warriors cat game technical difficulties.

Thanks a TON!!
It should be wayyy easier now.
smile   smile   smile


>~steora~<

Offline

 

Board footer