Action RPG Framework

by Forum_account
Action RPG Framework
A framework for developing action RPGs.
ID:854625
 
How does this proc works?. since there are no vars defined.
mob
proc
prompt()
if(!client)
CRASH("The mob '[src]' has no client.")

// create the HudAlert object
var/Prompt/p = new(arglist(list(src) + args))

return p.prompt()
You can pass any number of arguments to it so instead of having parameters like this:

mob/proc/prompt(text, option1, option2, option3)

It uses the args variable, which is defined inside every proc and is a list containing the arguments passed to the proc.
In response to Forum_account
Forum_account wrote:
You can pass any number of arguments to it so instead of having parameters like this:

> mob/proc/prompt(text, option1, option2, option3)
>

It uses the args variable, which is defined inside every proc and is a list containing the arguments passed to the proc.

but what if i want to set their size to custom
You pass the size parameters to the mob's prompt() proc:

// this makes a 6x4 window
mob.prompt("Hello!")

// this makes an 8x3 window
mob.prompt("Hello!", 8, 3)