3 registered members (AndrewAMD, Akow, 1 invisible),
1,417
guests, and 12
spiders. |
Key:
Admin,
Global Mod,
Mod
|
|
|
c_move and prticle funcitons
#236441
11/14/08 08:27
11/14/08 08:27
|
Joined: Jul 2008
Posts: 54 Taipei, Taiwan
PlaystationThree
OP
Junior Member
|
OP
Junior Member
Joined: Jul 2008
Posts: 54
Taipei, Taiwan
|
I'm makig an FPS style gam and am using particles to create explosions. I used c_move to move my bullet from the camera point forewards and the bullet stops at the first thing it hits. but when i want to make an explosion using my.x as the positon, it always create the explosion at the start point of the c_move when hitting an entity, but if it hits a wall it does fine. any ideas as to why this is happening?
Bet you don't know where Taiwan is lol.
"The Lord is my light and my salvation..." Psm 27:1
|
|
|
Re: c_move and prticle funcitons
[Re: MrGuest]
#236637
11/15/08 14:35
11/15/08 14:35
|
Joined: Feb 2008
Posts: 3,232 Australia
EvilSOB
Expert
|
Expert
Joined: Feb 2008
Posts: 3,232
Australia
|
do as mrguest says, it sounds like you are getting tangled in the me & you pointers. Easy to do when playing with collisions.
"There is no fate but what WE make." - CEO Cyberdyne Systems Corp. A8.30.5 Commercial
|
|
|
Re: c_move and prticle funcitons
[Re: EvilSOB]
#236708
11/16/08 01:29
11/16/08 01:29
|
Joined: Jul 2008
Posts: 54 Taipei, Taiwan
PlaystationThree
OP
Junior Member
|
OP
Junior Member
Joined: Jul 2008
Posts: 54
Taipei, Taiwan
|
Ok here it is:
action bulletAct(){ var temp; set(me,TRANSLUCENT); my.alpha = 0; my.skill1 = bullet; my.pan = camera.pan; my.roll = camera.roll; my.tilt = camera.tilt; my.pan -= accuVar/2; my.roll -= accuVar/2; my.tilt -= accuVar/2; my.pan += integer(random(accuVar*10))/10; my.roll += integer(random(accuVar*10))/10; my.tilt += integer(random(accuVar*10))/10; you = player; c_move(me,vector(range,0,0),nullvector,IGNORE_PASSABLE | IGNORE_PASSENTS | IGNORE_YOU); set(me,PASSABLE); wait(1); you = player; reset(me,PASSABLE); c_trace(camera.x,my.x,IGNORE_YOU | IGNORE_PASSABLE); effect(effect_explosion,50,target,nullvector); set(my,PASSABLE); wait(-1); ent_remove(me); }
Bet you don't know where Taiwan is lol.
"The Lord is my light and my salvation..." Psm 27:1
|
|
|
Re: c_move and prticle funcitons
[Re: PlaystationThree]
#236722
11/16/08 03:18
11/16/08 03:18
|
Joined: Feb 2008
Posts: 3,232 Australia
EvilSOB
Expert
|
Expert
Joined: Feb 2008
Posts: 3,232
Australia
|
I THINK you need to change your c_trace command to c_trace(camera.x,my.x,IGNORE_YOU | IGNORE_PASSABLE | IGNORE_ME);
"There is no fate but what WE make." - CEO Cyberdyne Systems Corp. A8.30.5 Commercial
|
|
|
Re: c_move and prticle funcitons
[Re: EvilSOB]
#236893
11/17/08 00:51
11/17/08 00:51
|
Joined: Apr 2006
Posts: 737 Ottawa, Canada
Ottawa
User
|
User
Joined: Apr 2006
Posts: 737
Ottawa, Canada
|
Hi! I believe that the "var temp;" is already included in GameStudio. You are redefining it in your action and there might be a conflict. Ottawa
|
|
|
Re: c_move and prticle funcitons
[Re: Ottawa]
#236898
11/17/08 01:08
11/17/08 01:08
|
Joined: Jan 2002
Posts: 4,225 Germany / Essen
Uhrwerk
Expert
|
Expert
Joined: Jan 2002
Posts: 4,225
Germany / Essen
|
No, that is not correct. If you define a variable "temp" in any of your functions, this is totally valid. It just creates a new local variable with the name "temp". The only drawback is then that you can't access the global variable temp.
Always learn from history, to be sure you make the same mistakes again...
|
|
|
Re: c_move and prticle funcitons
[Re: Ottawa]
#236916
11/17/08 05:19
11/17/08 05:19
|
Joined: Jul 2008
Posts: 54 Taipei, Taiwan
PlaystationThree
OP
Junior Member
|
OP
Junior Member
Joined: Jul 2008
Posts: 54
Taipei, Taiwan
|
Nope... I tried IGNORE_ME but the problem is still there.
Bet you don't know where Taiwan is lol.
"The Lord is my light and my salvation..." Psm 27:1
|
|
|
|