My new adventure game

Using a funny thing called currentFrameNumber or currentFrameName, you can set the position of the character to the ghost as long as the object’s current frame number is greater than, lesser than, or equal to a certain number.

since you wanted this:
image

we just rewrite in the update script inside the character clip:

//if Ghost is playing a frame number that is greater than 3
if (Ghost.currentFrameNumber > 3){
    this.x = Ghost.x; //set my position to Ghost
}
//otherwise dont do anything

The ghost clip is lacking a name, so you just give it whatever name it is if not Ghost.

… although do note that this is just one of the many solutions to this! You don’t even have to use the code up there, and just use a variable!

//inside the character clip
if (isGhost === true){// if whatever variable is true (from pressing e)
   this.x = Ghost.x; //set my position to Ghost
}

Not that you can’t use my solution or anyone else’s, but there are definitely efficient and practical ones out there for more… peculiarly complex problems.

so I bid you good luck on whatever shenanigans you’re up to with your projects!

meanwhile I want you to bookmark More Wick Documents, which pumpkinhead wrote, since it could be useful in the future.

1 Like

@KringlePrinkles man…>u< thanks so much you helped me a lot >u<…i think i might take more time to understand the code anyway…(i will tried my best)>u<

cool >u< I didnt think even think to search the wick doc in wick forum>u<…thanks…hmm…ok I’ll took my pencil and wrote that down(in the link)

1 Like

what’s your primary language? just wondering

Oh ok I was just wondering

1 Like

how to use variable…i…i never use it…
is it give value to the clip or…what??hmm

so to use a variable you just do this.

variablename = whathever

you could search up a tutorial too :).

1 Like

like

player = 10

?

1 Like

yes you could do something like

playerSpeed = 10

that’s what a variable is for it stores data to use in other parts of the code,

1 Like

ok >u<…
thanks @Jordy

you welcome :)

1 Like

Well if you are going to use variables, i recommend that you reference the objects when setting variables using (object name).(insert variable name).

why it wouldn’t work with just the var (variable declaration) was because the variable is only accessible inside the script in the object.

Let’s say i want objectA to have a variable called emotion, I’ll just go into the clip’s script and type this.emotion //this refering to the object itself.

if other objects have variables, you can change and set their variables directly.
we often use project.(variable name) so that any object can access these variables.

2 Likes

You explained it better then I could :)

thanks @KringlePrinkles >u<
testing…8-26-2021_13-57-25.wick (1.7 KB)
i tried and it work >u<…man…you help me a lot …thanks guys

2 Likes

man…with all your guys help i finally solved this problem >u< yay… thanks so much
https://drive.google.com/file/d/1zsmr3VtcX5Znz1kkm_0rVKIU8cvCndLZ/view?usp=sharing
(i got problem uploading the file here…so i use drive)

1 Like

nice game, can i help with coding?

1 Like

sure… >u<
here are my latest progress
https://drive.google.com/file/d/1zmrCWElfj6mIplCgBHCPj6GIAYvzpuko/view?usp=sharing
ok here what my plan for the game

  1. level1 - it just a tutorial for users to know that they could change themselves into other player (player 1 to player 2)
    ouh…player 1 can:
    run
    but he cant go through the wall
    player 2 can
    control player 1(actually player 2 just turn itself into player 1 so it make user think player 2 is controlling player 1 )
    and he can go through the wall (except the ghost wall(the fade in and fade out wall animation))

2.and then the level 1 finish when they going into the portal
3.after that …go to level 2
and they saw reven who was trap…and player 2 go to reven and
the comic appeared on the screen (to tell user the situation)
but the evil ghost got the key and he ran away from them so they had to chase the evil ghost…T uT
man its to long…

who’s reven again. also whats the comic

here https://drive.google.com/file/d/1ZJWki6E9-R5TFLia5aMqRtEa6Ab9nOdg/view?usp=sharing I hope you like it

1 Like

reven is one of the game character for level 2
and the comic tell situation the game was(for level 2)…i not making it right now…