GMLscripts.com

Discuss and collaborate on GML scripts
Invert

You are not logged in.

#1 2009-06-10 11:14:47

edy
Member
Registered: 2009-05-26
Posts: 8

gml script test chance dice have no clue

whistle

gml script test chance dice

up to 8 sides

how can i set this up

example

what someone would find in a treasure chest
the dice would say
like
side 1 would be apple
side 2 would be note
side 3 would be candle
side 4 would be gold
from 5 to 8 note says empty

when you click on the treasure chest
if dice is 3 then gold in the treasure chest you see gold
if dice is 5 then a note would say empty

i have the apple, note with message,candle,gold, note that says empty

script can also be used for
if someone steps on something
it will say you found a ruby and you see its under your feet -----or nothing will happen

do i need to start with create first
then use the mouse left button
i have no clue on how to set it up right.

whistle    From Edy

Offline

#2 2009-06-27 18:57:40

DZiW
Member
Registered: 2008-04-01
Posts: 3

Re: gml script test chance dice have no clue

So, you're using less than 15 arguments, right?
A bit offtopic, but I would just use something like

Expandresult=choose("apple", "note", "candle", "gold", "empty", "empty", "empty", "empty")

You also can return real objects, but I would replace empty with noone

Cheers

Last edited by DZiW (2009-06-27 18:59:39)


Feed your head

Offline

Board footer

Powered by FluxBB