mitchell

Member Since 14 Apr 2007
Offline Last Active Sep 01 2008 02:46 AM

In Topic: Help With Ai.....

27 June 2008 - 01:37 AM

Well, I have a major suggestion: Learn some scripting. A little goes a long way. It's quite easy to learn, and even if you don't master every single comand, you will be surprised how much you can do. As for the actual AI, some of that is quite simple. In fact, I don't think the rain one could be too much simpler. When it starts raining, you would set a variable to 1, (rather than 0). In the step event of any charcters that you would want to seek shelter, you would have it check if the value of the variable was 1. Then make it so that if the value was indeed found to be 1, then it would have the person walk to wherever they need to go using either paths, or having the person walk towards a series of invisible objects. In the collition event of the person have them walk towards the next object until they get where they need to go. I might make an example/tut.

In Topic: Drawing The Ceiling With Light.

11 April 2008 - 04:39 PM

I know it's basic, but did you check the draw color? Maybe it's black.

In Topic: Mosaic Lite...

11 April 2008 - 04:34 PM

```// MOSAIC Light 3D OBJ IMPORTER
// Don't edit this script

filename=argument0;
flipnormals = 1;
if (argument1>0) flipnormals=-1;
faces_list=ds_list_create();ds_list_clear(faces_list);

for (i=0;file_text_eof(fp)==false;i+=1) {

if (string_char_at(row,1)=="v" && string_char_at(row,2)==" ") {
row=string_delete(row,1,string_pos(" ",row));
vx=real(string_copy(row,1,string_pos(" ",row)));
row=string_delete(row,1,string_pos(" ",row));
vy=real(string_copy(row,1,string_pos(" ",row)));
row=string_delete(row,1,string_pos(" ",row));
vz=real(string_copy(row,1,string_length(row)));
}

if (string_char_at(row,1)=="v" && string_char_at(row,2)=="n") {
row=string_delete(row,1,string_pos(" ",row));
nx=real(string_copy(row,1,string_pos(" ",row)));
row=string_delete(row,1,string_pos(" ",row));
ny=real(string_copy(row,1,string_pos(" ",row)));
row=string_delete(row,1,string_pos(" ",row));
nz=real(string_copy(row,1,string_length(row)));
}

if (string_char_at(row,1)=="v" && string_char_at(row,2)=="t") {
row=string_delete(row,1,string_pos(" ",row));
tx=real(string_copy(row,1,string_pos(" ",row)));
row=string_delete(row,1,string_pos(" ",row));
ty=real(string_copy(row,1,string_length(row)));
}

if (string_char_at(row,1)=="f" && string_char_at(row,2)==" ") {
row=string_replace_all(row,"  "," ");
row=string_delete(row,1,string_pos(" ",row));
if (string_char_at(row,string_length(row))==" ") row=string_copy(row,0,string_length(row)-1);
face_num=string_count(" ",row);
face_division=1;
temp_faces[0]=0;

for (fc=0;fc<face_num;fc+=1) {
f=string_copy(row,1,string_pos(" ",row));
row=string_delete(row,1,string_pos(" ",row));
temp_faces[face_division]=f;
face_division+=1;
}

f=string_copy(row,1,string_length(row));temp_faces[face_division]=f;
if (face_division==3) {
f1=temp_faces[2];
f2=temp_faces[3];
f3=temp_faces[1];
} else {
f1=temp_faces[2];
f2=temp_faces[3];
f3=temp_faces[1];
for (t=0;t<face_division-3;t+=1) {
f1=temp_faces[4+t];
f2=temp_faces[1];
f3=temp_faces[3+t];
}
}
}

}
file_text_close(fp);

tm=d3d_model_create();
tsn=0;
d3d_model_primitive_begin(tm,pr_trianglelist);

for (fc=0;fc<ds_list_size(faces_list);fc+=1) {

sub_face=ds_list_find_value(faces_list,fc);

if (string_count("/",sub_face)==0) {
f_index=sub_face;
t_index=-1;
n_index=-1;
}

if (string_count("/",sub_face)==1) {
f_index=string_copy(sub_face,1,string_pos("/",sub_face)-1);
sub_face=string_delete(sub_face,1,string_pos("/",sub_face));
t_index=string_copy(sub_face,1,string_length(sub_face));
n_index=-1;
}

if (string_count("/",sub_face)==2 && string_count("//",sub_face)==0) {
f_index=string_copy(sub_face,1,string_pos("/",sub_face)-1);
sub_face= string_delete(sub_face,1,string_pos("/",sub_face));
t_index=string_copy(sub_face,1,string_pos("/",sub_face)-1);
sub_face= string_delete(sub_face,1,string_pos("/",sub_face));
n_index=string_copy(sub_face,1,string_length(sub_face));
}

if (string_count("/",sub_face)==2 && string_count("//",sub_face)==1) {
sub_face=string_replace(sub_face,"//","/");
f_index=string_copy(sub_face,1,string_pos("/",sub_face)-1);
sub_face= string_delete(sub_face,1,string_pos("/",sub_face));
t_index=-1;
n_index=string_copy(sub_face,1,string_length(sub_face));
}

vx=ds_list_find_value(vertex_list1,floor(real(f_index)));
vy=ds_list_find_value(vertex_list2,floor(real(f_index)));
vz=ds_list_find_value(vertex_list3,floor(real(f_index)));

if (floor(real(n_index))!=-1 && ds_list_size(normal_list1)>=1) {
nx=flipnormals*ds_list_find_value(normal_list1,floor(real(n_index)));
ny=flipnormals*ds_list_find_value(normal_list2,floor(real(n_index)));
nz=flipnormals*ds_list_find_value(normal_list3,floor(real(n_index)));
} else {
nx=0;
ny=0;
nz=0;
}

if (floor(real(t_index))!=-1 && ds_list_size(texture_list1)>=1) {
tx=ds_list_find_value(texture_list1,floor(real(t_index)));
ty=ds_list_find_value(texture_list2,floor(real(t_index)));
} else {
tx=0;
ty=0;
}

d3d_model_vertex_normal_texture(tm,vx,vy,vz,nx,ny,nz,tx,ty);

tsn+=1;
if (tsn==999) {
tsn=0;
d3d_model_primitive_end(tm);
d3d_model_primitive_begin(tm,pr_trianglelist);
}
}

d3d_model_primitive_end(tm);
return tm;```

In Topic: +=1

25 August 2007 - 10:34 PM

No I did it in only one, plus I didn't use a script so I know that I didn't acidentally add it to more than one. And now I am noticing that it is not adding 4 each time, but now it is doing 3, 2, 4, 5, 3, 2, etc. And I haven't even noticed a pattern. Here's the full code:

if (distance_to_object(Char) < 20){
if talk=0{
choice=show_message_ext("Father Eroe would like to speak to you, "+string(global.charname)+'.','I will do it.','I will not.','Why?')
if choice=1{
show_message('You are a good kid. I will remember this.')
talk=1
exit;}
if choice=2{
show_message('How dare you? I will remember this.')
talk=2
exit;}
if choice=3{
choice1=show_message_ext('I do not know. All I know is that he wants to talk to you.','I will do it.','I will not.','I will think about it.')}
if choice1=1{
show_message('You are a good kid. I will remember this.')
talk=1
exit;}
if choice1=2{
show_message('How dare you? I will remember this.')
talk=2
exit;}
if choice1=3{
show_message('How dare you. You do what I tell you. I shall not forget this.')
talk=2
exit;}}
if talk=1{
choice2=show_message_ext('So I thought you were going to talk to father Eroe.  Are you going to hurry up and do it?','Yes. Right now.','I will not.','I forgot, why?')
if choice2=1{
show_message('Son, you make me so proud. I will not forget how repsectful you have been.')
talk=3
exit;}
if choice2=2{
show_message('You do not talk to me that way! Do not think I will forget this.')
talk=4
exit;}
if choice2=3{
choice3=show_message_ext('I told you, I do not know why. He just told me he would like to speak to you. Will you be speaking to him then?','I will.','I will not.','I will later.')
if choice3=1{
show_message('Now that is the right choice. I will not forget how good you have been.')
talk=3
exit;}
if choice3=2{
show_message('Do not speak to your father that way. You WILL speak to him, and I will not forget this!')
talk=4
exit;}
if choice3=3{
show_message('Do not speak to your father that way. You WILL speak to him now, and I will not forget this!')
talk=4
exit;}}}
if talk=2{
choice2=show_message_ext('I thought I told you to talk to father Eroe.  Are you going to hurry up and do it?','Yes. Right now.','I will not.','I forgot, why?')
if choice2=1{
show_message('Son, Although you are now doing the right thing, I will not forget about before.')
talk=5
exit;}
if choice2=2{
show_message('You do not talk to me that way! Do not think I will forget this.')
talk=4
exit;}
if choice2=3{
choice3=show_message_ext('I told you, I do not know why. He just told me he would like to speak to you. Will you be speaking to him then?','I will.','I will not.','I will later.')
if choice3=1{
show_message('Son, Although you are now doing the right thing, I will not forget about before.')
talk=5
exit;}
if choice3=2{
show_message('Do not speak to your father that way. You WILL speak to him, and I will not forget this!')
talk=4
exit;}
if choice3=3{
show_message('Do not speak to your father that way. You WILL speak to him now, and I will not forget this!')
talk=4
exit;}}}
if talk=3{
show_message('Do what I told you to do. I guess you were just lying when you told me you would talk to him. Do not talk to me until you talk to him or you will regret it.')
talk=6
exit;}
if talk=4{
show_message("Go talk to Father Eroe or you will wish you weren't born.")
talk=7
exit;}
if talk=5{
show_message('Do what I told you to do. I guess you were just lying when you told me you would talk to him. Do not talk to me until you talk to him or you will regret it.')
talk=6
exit;}
if talk=7{
show_message("I guess you aren't so respectable!")
talk=6
exit;}
if talk=6{
show_message("Damn! I swear it's like talking to a wall!")
talk=8
exit;}
if talk=8{
show_message('What has gotten into you?!')
talk=9
exit;}
if talk=9{
show_message("Damn-it. I will disown you!")
talk=10
exit;}
if talk=10{
show_message("I refuse to talk to you until you talk to Father Eroe!")
talk=11
exit;
}
talk+=1
if talk=100{
show_message("Don't you have anything better to do than stand there bugging me all day?!")
exit;}
if talk=1000{
show_message("Wow you have a life.")
exit;}
if talk=10000{
show_message("Ok if you're just gunna do this all day then get off of the damn computer and go ride a bike or something.")
exit;}
if talk=100000{
show_message("Holy crap!!!! You've pressed the action button 100000 times! You're like my friend Zach. But really kid get a life.")}
if talk=1000000{
show_message("What the **** is wrong with you? ONE MILLION TIMES?!")}
if talk=10000000{
show_message('Ten million?!!! Here you get a one trillion gold wallet. I dare you to fill it.')
global.moneymax=1000000000000}
if talk=100000000{
show_message("One hunderd million? Fine here's a ten trillion gold wallet. Again try to fill it.")
global.moneymax=10000000000000}
if talk=1000000000{
show_message("Wow. One Billion. Ok, save this profile, email the .sav file to mitchellmcduff@gmail.com. I gotta see this. Now don't waste your time doing anymore because this message will just be displayed over and over.")}
if talk>1000000000{
show_message("Wow. One Billion. Ok, save this profile, email the .sav file to mitchellmcduff@gmail.com. I gotta see this. Now don't waste your time doing anymore because this message will just be displayed over and over.")}
exit;}