I'm trying to find how they are made (their code) but can't find any info.
I searched roll on Edukewiki it doesn't seem to be something I'm looking for.
I'm trying to find a code to make something when you shoot or push space it rolls just same as pool balls.
But it doesn't break (unbreakable).
Do you know any codes to make something that act the same as the STRIPEBALL and QUEBALL accept it doesn't breaks.?
Don't want em to break.
Page 1 of 1
About the STRIPEBALL and QUEBALL "You know those pool table balls"
#1 Posted 02 February 2011 - 09:51 AM
This post has been edited by Zaxtor: 02 February 2011 - 09:52 AM
#2 Posted 03 February 2011 - 03:18 AM
Are you willing to make a custom CON file for us to download so we can play?
#3 Posted 03 February 2011 - 07:11 AM
All you really have to do is create a useractor that checks the player's angles, changes its own angles accordingly, and moves when the player presses space on it. There's probably a more efficient way of doing it, but here's what I came up with...
define PUSHBALL 3347 // This is a blank tile in #13 ART tile. I just copy/pasted it from tile #1220 gamevar PERPLAYER1 0 1 gamevar PERPLAYER2 0 1 gamevar TEMP1 0 2 gamevar TEMP2 0 2 gamevar TEMP3 0 2 gamevar ANGVAR 0 2 // These are all the gamevar declarations needed. Just a bunch of peractor/player vars used for storing angle values, etc. move STOP move SLIDE1 75 move SLIDE2 50 move SLIDE3 25 // And these are the different velocities at which the ball moves after it's been pushed. Doing it this way gives it the illusion that the ball's slowing down as it rolls. action BALLIDLES 0 1 1 1 1 // just an idle action that the actor's initiated to useractor notenemy PUSHBALL 0 BALLIDLES cstat 1 sizeat 25 25 ifpdistl 1200 { ifp pfacing { ifhitspace { ifaction BALLIDLES { // if the player hits space on the ball while within a certain distance (and of course, the ball is still idling...) getplayer[THISACTOR].posx PERPLAYER1 // execute the next block of code getplayer[THISACTOR].posy PERPLAYER2 getactor[THISACTOR].x TEMP1 getactor[THISACTOR].y TEMP2 subvarvar PERPLAYER1 TEMP1 subvarvar PERPLAYER2 TEMP2 getangle ANGVAR PERPLAYER1 PERPLAYER2 // get the angle the ball would need to be facing the player... subvar ANGVAR 960 // and then make it face the opposite direction. Funny thing is, I thought you'd have to multiply the value by -1 if it was less than zero, but that actually kept it from working properly setactor[THISACTOR].ang ANGVAR move SLIDE1 geth } } } } // and this next bit of code just makes it slide around horizontally, slowing it down by changing out the move commands as time goes on, till it stops altogether. ifmove SLIDE1 { ifcount 10 { move SLIDE2 geth } } else ifmove SLIDE2 { ifcount 20 { move SLIDE3 geth } } else ifmove SLIDE3 { ifcount 30 { action BALLIDLES move STOP } } endaAnd that's all there really is to it. You could probably also use the movesprite command, but I figured this would be a better way to go about it.
#4 Posted 03 February 2011 - 09:54 AM
Hey, I've never understood how the Move command worked and have been trying to figure it out for ages! Basically, I just want to say, thanks, even though you didn't intend this code to be of use to me, thanks for simplifying the use of that command.
#6 Posted 03 February 2011 - 05:20 PM
High Treason, on Feb 3 2011, 06:54 PM, said:
Hey, I've never understood how the Move command worked and have been trying to figure it out for ages! Basically, I just want to say, thanks, even though you didn't intend this code to be of use to me, thanks for simplifying the use of that command.
The move command is what makes an actor, uhh move xD You define the move command with a number, that number is the speed it will move at. Then the location you put in the move command, you can tell it how to move.
Could be away from player, or making the actor look at the player.
#7 Posted 03 February 2011 - 11:34 PM
Oh, I know what the command is for, I just never really understood how to use it, the last time I looked it up on EDuke Wiki it had some redundant description like;
"The Move Command is used to make Actors Move."
With no examples or any proper explanation of it's syntax, many commands are like this on the Wiki. For some reason, I could never get it working either and gave up, but after copying of how it was used in EmericaSkater's example I can get it to work to some extent, though I am not entirely sure where I went wrong previously as I hadn't tried experimenting with it in about a year.
Keep in mind that CON is quite far from the Commodore 64 BASIC and similar languages that I am used to using.
"The Move Command is used to make Actors Move."
With no examples or any proper explanation of it's syntax, many commands are like this on the Wiki. For some reason, I could never get it working either and gave up, but after copying of how it was used in EmericaSkater's example I can get it to work to some extent, though I am not entirely sure where I went wrong previously as I hadn't tried experimenting with it in about a year.
Keep in mind that CON is quite far from the Commodore 64 BASIC and similar languages that I am used to using.
#8 Posted 04 February 2011 - 05:06 AM
I'm surprised you were as nice in responding to that blatant (and somewhat condescending) "METOOMETOO" post above yours as you were, but maybe that's just me. I sort of have the same problem you do with some of the vanilla commands i.e, they seem like they should be a bit simpler to work with but they still kinda leave me scratching my head.
I'd actually originally tried using some of the move command's other directional values when I first threw that code together (faceplayer, fleeenemy, etc.) but it wasn't working the way I wanted it to, so I eventually decided to just manipulate the actor's angles directly. Whatever works, I guess.
I'd actually originally tried using some of the move command's other directional values when I first threw that code together (faceplayer, fleeenemy, etc.) but it wasn't working the way I wanted it to, so I eventually decided to just manipulate the actor's angles directly. Whatever works, I guess.
This post has been edited by EmericaSkater: 04 February 2011 - 07:09 AM
#9 Posted 04 February 2011 - 09:06 AM
Share this topic:
Page 1 of 1