GMBR
Gostaria de reagir a esta mensagem? Crie uma conta em poucos cliques ou inicie sessão para continuar.
Entrar

Esqueci-me da senha

Últimos assuntos
» Como ajustar velocidade de cada frame da animação no game maker
por pequetux Hoje à(s) 16:45

» Preciso de ajuda
por AftonDuGrau Dom 21 Abr 2024, 20:18

» Como faz o evento drawn GUI, não se repetir?
por aminaro Sex 19 Abr 2024, 20:30

» PROBLEMAS COM FÍSICAS DE ÁGUA
por aminaro Ter 16 Abr 2024, 10:07

» Retorno da GMBR!!!
por Ralphed Sex 12 Abr 2024, 22:45

» JOGADOR PARANDO NO AR QUANDO ATACA
por aminaro Qua 10 Abr 2024, 13:51

» Problemas com texto interativo
por Kaaru72 Dom 07 Abr 2024, 11:31

» Erro escondido e indecifrável
por dev_gabize.azv Qui 04 Abr 2024, 10:11

» Mudar cor de apenas uma palavra
por Ralphed Sáb 30 Mar 2024, 00:39

» Procuro Programador de game maker
por Wou Sex 15 Mar 2024, 10:27

» Mod APK
por gamerainha Qua 13 Mar 2024, 06:30

» Aceito pedidos de sprites (Com exemplos meus)
por Sevilha Qua 28 Fev 2024, 12:17

» Inventário simples
por Isquilo_Roedor Qui 22 Fev 2024, 15:18

» Problemas na programaçnao de inimigo [jogo DOOM LIKE]
por Black Mirror Dom 11 Fev 2024, 13:34

» ANDROID MULTI TOUCH
por DiegoBr Dom 04 Fev 2024, 12:13

» Servidor de Discord do fórum?
por Lighter Sáb 27 Jan 2024, 17:18

» Save e Load Json
por Klinton Rodrigues Qui 25 Jan 2024, 11:12

» Colisão com mais de um objeto
por aminaro Seg 22 Jan 2024, 15:02

» Oi sou novo aqui
por Thiago Silveira Alexandre Sáb 20 Jan 2024, 20:55

» Como acessar conteudo comprado no marketplace
por macmilam Sex 19 Jan 2024, 07:42

» Devlogs em vídeos do Block Room
por Joton Seg 15 Jan 2024, 16:56

» Alguém aqui já ganha dinheiro com seus games?
por Joton Seg 15 Jan 2024, 16:49

» ACERVO GMBR MAGAZINE
por Joton Qui 11 Jan 2024, 19:21

» como aumentar o obj sem aumentar a colisão??
por GabrielXavier Qua 10 Jan 2024, 07:21

» Asteroid Core - Early Acesse Update [0.2.0.0]
por JOZ. Seg 08 Jan 2024, 14:39


efeito de chuva dando erro

2 participantes

Ir para baixo

efeito de chuva dando erro Empty efeito de chuva dando erro

Mensagem por darth vader Seg 19 Jul 2010, 16:21

tá dando esse erro:
ERROR in
action number 1
of Create Event
for object object_bike:

Error in code at line 5:
ch=part_changer_create(obj_rain_2.ps);//creates a new paticle changer
^
at position 36: Unknown variable ps


mesmo q eu coloque global,ou instance exists, ñ reconhce a variavel.
peguei esse codigo de uma engine em ingles,o q complicou ainda mais,
ai ta o codigo da chuva:

create:
ps=part_system_create();//creates a new particle system
em=part_emitter_create(ps);//creates a new particle emitter

part_emitter_region(ps,em,view_xview-800,view_xport+800,view_yview-10,view_yview-10,ps_shape_rectangle,ps_distr_linear);//sets the emitters region to just above the area you can see

rn=part_type_create();//creates a new particle type
part_type_alpha2(rn,1,0.1);//sets the alpha of the new particle
part_type_blend(rn,true);//sets the blending of the new particle
part_type_color2(rn,make_color_rgb(25,25,255),make_color_rgb(25,25,150));//sets the color of the new particle
part_type_direction(rn,250,200,0,0);//sets the direction of the new particle
part_type_life(rn,75,125);//sets the life of the new particle
part_type_orientation(rn,0,0,0,0,true);//sets the angle of the new particle
part_type_shape(rn,pt_shape_line);//sets the shape of the new particle
part_type_size(rn,0.1,0.2,0,0);//sets the size of the new particle
part_type_speed(rn,7,15,0.05,0);//sets the speed of the new particle

sp=part_type_create();//creates a new particle type
part_type_alpha2(sp,1,0);//sets the alpha of the new particle
part_type_blend(sp,true);//sets the blending of the new particle
part_type_color1(sp,make_color_rgb(25,25,255));//sets the color of the new particle
part_type_direction(sp,0,360,0,0);//sets the direction of the new particle
part_type_gravity(sp,0.25,270);//sets the gravity of the new particle
part_type_life(sp,50,50);//sets the life of the new particle
part_type_orientation(rn,0,0,0,0,true);//sets the angle of the new particle
part_type_shape(sp,pt_shape_sphere);//sets the shape of the new particle
part_type_size(sp,0.1,0.1,-0.0001,0);//sets the size of the new particle
part_type_speed(sp,2,5,0.05,0);//sets the speed of the new particle


step:
part_emitter_burst(ps,em,rn,5);//creates five particles each step


room end:
//destroys all the particle systems etc. because we don't need them
part_type_destroy(rn);
part_emitter_destroy(ps,em);
part_system_destroy(ps);


do player:

create:
ch=part_changer_create(obj_rain_2.ps);//creates a new paticle changer
part_changer_types(obj_rain_2.ps,ch,obj_rain_2.rn,obj_rain_2.sp);//sets the types the particle changer 'changes'

end step:
//sets the region of the particle changer
part_changer_region(obj_rain_2.ps,ch,x-sprite_width/2,x+sprite_width/2,y-sprite_height/2,y+sprite_height/2,ps_shape_rectangle);

room end:
//destroys all the particle systems etc. because we don't need them
part_changer_destroy(obj_rain_2.ps,ch);


feliz2
darth vader
darth vader

Data de inscrição : 29/10/2009
Reputação : 0
Número de Mensagens : 85
Prêmios : efeito de chuva dando erro Empty

Medalhas x 0 Tutoriais x 0 Moedas x 0

Ouro x 0 Prata x 0 Bronze x 0

Insignia 1 x 0 Insignia 2 x 0 Insignia 3 x 0

Ir para o topo Ir para baixo

efeito de chuva dando erro Empty Re: efeito de chuva dando erro

Mensagem por bootzin Ter 20 Jul 2010, 14:08

cara, primeiro de tudo eu iria dizer que tinha que ser global porque tá uma mesma variável em objetos diferentes, mas como vc disse que já tentou faz o seguinte:
pega o código em que você define a variável:
Código:
ps=part_system_create();//creates a new particle system
agora copia e cola ele no evento create do player.
Me diz ai se deu certo, se ainda der erro eu vo tenta monta uma engine pra vc Happy
bootzin
bootzin

Data de inscrição : 28/01/2010
Reputação : 5
Número de Mensagens : 136
Prêmios : efeito de chuva dando erro Empty

Medalhas x 0 Tutoriais x 0 Moedas x 0

Ouro x 0 Prata x 0 Bronze x 0

Insignia 1 x 0 Insignia 2 x 0 Insignia 3 x 0

Ir para o topo Ir para baixo

efeito de chuva dando erro Empty Re: efeito de chuva dando erro

Mensagem por darth vader Seg 26 Jul 2010, 16:40

desculpa a demora,é q eu tô sem net em casa!
bom, ñ deu certo, ficou no mesmo erro,eu tentei novamente colocar como
global, mas dá semdpre o mesmo erro... Sad
darth vader
darth vader

Data de inscrição : 29/10/2009
Reputação : 0
Número de Mensagens : 85
Prêmios : efeito de chuva dando erro Empty

Medalhas x 0 Tutoriais x 0 Moedas x 0

Ouro x 0 Prata x 0 Bronze x 0

Insignia 1 x 0 Insignia 2 x 0 Insignia 3 x 0

Ir para o topo Ir para baixo

efeito de chuva dando erro Empty Re: efeito de chuva dando erro

Mensagem por Conteúdo patrocinado


Conteúdo patrocinado


Ir para o topo Ir para baixo

Ir para o topo

- Tópicos semelhantes

 
Permissões neste sub-fórum
Não podes responder a tópicos