11. unknown by ultrav33

Image
User avatar
Rudy
Caiman Moderator
Posts: 2704
Joined: Sat May 31, 2008 7:42 pm
Location: Belgium
Contact:

Re: 11. unknown by ultrav33

Postby Rudy » Sun Oct 05, 2008 2:39 pm

I am very good in writing scripts, no matter if it is basic, c, pascal or whatever. I know gamemaker uses a language that is very close to C/C++, so no problem. But as I don't know how gamemaker works, I don't where you can add a script. In most compilers there is an OnClick event. Also a mouse event could be usefull, as long as I can write a script for it :D

ultrav33
Posts: 34
Joined: Mon Sep 29, 2008 10:57 pm

Re: 11. unknown by ultrav33

Postby ultrav33 » Sun Oct 05, 2008 2:49 pm

ok here is my script for when you bet you money.

Code: Select all

rep = true
while rep {
system.betmoney = get_integer( "How much do you want to bet? Dont bet too high!", 0 )
if system.betmoney < 1 {
show_message( "Bid atleast something!" ) }
if system.betmoney < score {
show_message( "You need to bet more then you current balance." ) }
else {
rep = false } }

User avatar
Rudy
Caiman Moderator
Posts: 2704
Joined: Sat May 31, 2008 7:42 pm
Location: Belgium
Contact:

Re: 11. unknown by ultrav33

Postby Rudy » Sun Oct 05, 2008 2:57 pm

That's great, but not usable for the onclick event

Just one remark:
You wrote:
if system.betmoney < score {
show_message( "You need to bet more then you current balance." ) }

That's sounds not correct.

Maybe better: (I suppose score = your current balance)
if system.betmoney > score {
system.betmoney = score}

(thus when the gamer makes a too high bet, the max will be taken as bet)

ultrav33
Posts: 34
Joined: Mon Sep 29, 2008 10:57 pm

Re: 11. unknown by ultrav33

Postby ultrav33 » Sun Oct 05, 2008 3:03 pm

should i use this fore the score script, i have two this i havent tested yet.

Code: Select all

score=.002*system.betmoney

OR

score=random(25)

ultrav33
Posts: 34
Joined: Mon Sep 29, 2008 10:57 pm

Re: 11. unknown by ultrav33

Postby ultrav33 » Sun Oct 05, 2008 3:06 pm

by the way, i dont think there is a 1 click event in game maker, so i dont know what you are talking about.

User avatar
Rudy
Caiman Moderator
Posts: 2704
Joined: Sat May 31, 2008 7:42 pm
Location: Belgium
Contact:

Re: 11. unknown by ultrav33

Postby Rudy » Sun Oct 05, 2008 3:09 pm

if
score=.002*system.betmoney
(every chip will give you 0.002 * bet)
works, then I can write a good script for you. :)

ultrav33
Posts: 34
Joined: Mon Sep 29, 2008 10:57 pm

Re: 11. unknown by ultrav33

Postby ultrav33 » Sun Oct 05, 2008 3:22 pm

ye it works, but the script is actually,

Code: Select all

score+=.002*system.betmoney

There needed to be a plus sign in the script. tell me what u can do with it.

User avatar
Rudy
Caiman Moderator
Posts: 2704
Joined: Sat May 31, 2008 7:42 pm
Location: Belgium
Contact:

Re: 11. unknown by ultrav33

Postby Rudy » Sun Oct 05, 2008 3:32 pm

Great!!!

Then try the next one:

Code: Select all

// score per chip
i = random(51);
if i<30{
   score+=.002*system.betmoney;}
else{
   if i==30{
         score+=2*system.betmoney;}
   else{
      score+=.01*system.betmoney;}
}

ultrav33
Posts: 34
Joined: Mon Sep 29, 2008 10:57 pm

Re: 11. unknown by ultrav33

Postby ultrav33 » Sun Oct 05, 2008 3:36 pm

it works, should i put this on every chip?

User avatar
Rudy
Caiman Moderator
Posts: 2704
Joined: Sat May 31, 2008 7:42 pm
Location: Belgium
Contact:

Re: 11. unknown by ultrav33

Postby Rudy » Sun Oct 05, 2008 3:39 pm

yes if you can do that. ;)

BTW I hope I used the right syntax.
maybe it had to be: i:=random(51); instead of i=random(51);


Return to “Casino Games Contest”

Who is online

Users browsing this forum: No registered users and 2 guests