The X and Y assignments need to be swapped, as the first 2 bits (values 1 and 2) are for Up/Down, and the latter 2 bits (4 and 8) are for Left/Right. Also, I would suggest placing "VSYNC 1" at the beginning of the loop so it doesn't just zip in one direction.
Hey @bigdog00 or @bigdog_00 cant remember which... what is the latest version of CincOS
Uh... When I get my new PC I will upload the newest one. It has a touchscreen based lock and faster startup time. It is way better, and it allows you to make 2 custom shortcuts on the desktop. There are many more features, but I have yet to release it. Give me a few weeks.
How do I spawn a sprite randomly in the world? I'm trying to spawn a desert eagle randomly in the world. And in different parts of the map if it's possible? I've got a loop for it if it respawns too.
Thanks in advance, now I have a crash to fix.
How do I spawn a sprite randomly in the world? I'm trying to spawn a desert eagle randomly in the world. And in different parts of the map if it's possible? I've got a loop for it if it respawns too.
Thanks in advance, now I have a crash to fix.
SPX=RND(50000)-RND(50000)
SPY=RND(50000)-RND(50000)
SPSET ID,da,da,da,da,da @LOOPYDOOPY
SPOFS ID,SPX,SPY
GOTO @LOOPYDOOPY
and for player movement make sure to do the opposite like this
moving right:
SPX=SPX+1
moving left:
SPX=SPX-1
moving up:
SPY=SPY+1
moving down:
SPY=SPY-1
that basic jist
SPSET control number, sprite character number, palette number, horizontal rotation, vertical rotation, order of precedence [, width, height]
Using only the required fields (those in brackets are optional), using control number 0, the first palette of 16 sets, no horizontal/vertical rotation, and is in front of all background layers and console layer, it would be like this
SPSET 0, 96, 0, 0, 0, 0
The width and height are optional. When not used, they will take on 16x16 pixels, which in this case is what you want anyways.
actualy the red wizard is 95 and 0,96,0,0,0 is the blue wizard female i need to know the spset for the red wizard guy. thanks for your help so far though
nevermind i got it it was 0,195,0,0,0. but i understand there are different views of the red wizard like up, down, left and right,. after every walk command like for up its:
IF B AND 1 THEN Y=Y-1
would i put the up figure right after it so it looks like ths:
SPSET should only be used when you need to create/reset a sprite. When you want to just change the sprite graphics, orientation, etc, use SPCHR instead. Using SPCHR will retain numerous attributes to the sprite, like position (set with SPOFS), scale (SPSCALE), and angle (SPANGLE), whereas using SPSET will reset them. SPCHR cannot be used on a sprite that was not first created with SPSET.
Forums
Topic: Petit Computer
Posts 9,241 to 9,260 of 9,618
Sorry, this topic has been locked.