How do you stop the player from saving?
Forum
Stranded II Scripts Scripting QuestionsHow do you stop the player from saving?
Bloodshot has written
Um... Idts... When you use on:selectplace { it means when you select a place for a building... What builder said was actually determained by camera executions. well, anyways...
How do you stop the player from saving?
How do you stop the player from saving?
Except we were not talking about the EVENT "selectplace", we were talking about the *command* selectplace. There is a large difference there. Honestly guys, if you don't know what something does, the best thing to do is at least figure out the proper syntax, and then just mess around with it.
-Builder
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
### Calculator Tree 1 id=224 name=Palm group=palm icon=gfx\palm01.bmp model=gfx\palm01.b3d swayspeed=12 swaypower=12 fx=16 scale=2.3 mat=wood health=900 find=15,15,3 behaviour=tree healthchange=15 script=start on:hit { $calctree1++; msg "$calctree1 + $calctree2 = $calctree1+=$calctree2"; } script=end ### Calculator Tree 2 id=225 name=Palm group=palm icon=gfx\palm01.bmp model=gfx\palm01.b3d swayspeed=12 swaypower=12 fx=16 scale=2.3 mat=wood health=300 find=15,15,3 behaviour=tree healthchange=15 script=start on:hit { $calctree2++; msg "$calctree1 + $calctree2 = $calctree1+=$calctree2"; } script=end
So what went wrong?
1
2
3
4
5
2
3
4
5
on:hit { $calctree1++; $calctree3=$calctree1 + $calctree2; msg "$calctree1 + $calctree2 = $calctree3"; }
Is it possible to make player input something, for example his name, or some number, and it'd be saved to variable or something...??
This command returns an entry of the Player.
But I can't translate the description or write an example.
Schnapsidee has written
inputwin
This command returns an entry of the Player.
But I can't translate the description or write an example.
This command returns an entry of the Player.
But I can't translate the description or write an example.
Gah, was going to say that but I was running late on time. I just *barely* got into the theatre in time, the previews were just finishing up, and the Dark Knight starting. I was like "HOLY SHIT OMFG".
But yea, that command should do what you want. And Bloodshot, there already is a "chat" command in-game, I found it accidentally in the editor. It was some obscure key.
Give me a couple of minutes to test the inputwin command, I'll see if I can debug it enough to figure out how to use it properly.
That way players will be able to write stuff, which is another thing I've been planning to do.
EDIT: Got it.
At first I thought the "text" variable was the name of the variable it would create, so I messed around with trying to debug that with my ghetto debug system (aka, msg command). After my first test I realized that was the TITLE of the "window", and quickly thought that perhaps the message was written in the BUFFER. So I found a command that writes a message directly from the buffer, and lo and behold there was nothing there.
So now I was really fucking confused, but I realized something. Decisionwin and other commands don't write to the buffer, nor do they create a variable. They are used to DEFINE a variable.
I quickly tested this simple script:
$text = inputwin();
msg "$text";
Much to my surprise it worked. I've tried for maybe 15 minutes now trying to get the damn script to work with different versions, such as:
$text = inputwin "text",3();
Or:
$text = (inputwin "text",3());
But it just won't work. So for now I guess if you want the player to be able to write something, they will have to settle for a window without a title.
-Builder
edited 1×, last 19.07.08 02:11:25 am
1
2
3
2
3
on:trigger { 	 diary "Rock" ,"???"; 	 }
im useing it with a area trigger and it shows the entry but it wont stop poping up
garfield751 has written
i need alittle help with this script
im useing it with a area trigger and it shows the entry but it wont stop poping up
1
2
3
2
3
on:trigger { 	 diary "Rock" ,"???"; 	 }
im useing it with a area trigger and it shows the entry but it wont stop poping up
There is probably a better way to do this, but I don't have time to mess around and find out how... Make a variable like "$visited" and attach that to the script. Then make it so:
1
2
3
4
5
6
2
3
4
5
6
on:trigger { 		if ($visited = 0) { 	 		diary "Rock" ,"???"; 			$visited = 1; 		} 	 }
Btw, don't do anything stupid. Make sure the variable IS NOT DECLARED ANYWHERE A RE-DECLARATION OCCURS EACH TIME THE SCRIPT IS RUN. Aka, make sure that the variable is *not* reset to the 0 when the area trigger goes off, otherwise this will not work at all.
-Builder
1
free "self"
garfield751 has written
erm.... thanks for your help builder but i figured it out after i rooted thorugh the adventure files for the first island and all i needed to add was
1
free "self"
Ah, that was the "simple" way I was talking about. *shrug* Forgot about that, heh, it removes the area trigger completely.
-Builder
Schnapsidee has written
inputwin
This command returns an entry of the Player.
But I can't translate the description or write an example.
This command returns an entry of the Player.
But I can't translate the description or write an example.
Thanks. I won't drink vodka anymore, I'll drink only Schnaps
Builder, thanks too
Builder2-0 has written
So for now I guess if you want the player to be able to write something, they will have to settle for a window without a title.
I finally got it working!
$name = inputwin("Enter your Name",1);
if($name==0) { $name="unknown"; }
msgbox $name, "Hello, my name is $name";
@Gloppy: keine Ursache
Ok, I'm going to drink vodka again
Edit: But I still don't know what are "cancel","okay" commands for...... I'll keep trying:)
Edit 2: I found out.. it disappointed me a little.. It's just title of cancel, okay buttons...
edited 2×, last 19.07.08 04:53:53 pm
incskill