Gamestudio Links
Zorro Links
Newest Posts
AlpacaZorroPlugin v1.3.0 Released
by kzhao. 05/22/24 13:41
Free Live Data for Zorro with Paper Trading?
by AbrahamR. 05/18/24 13:28
Change chart colours
by 7th_zorro. 05/11/24 09:25
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
3 registered members (AndrewAMD, Akow, 1 invisible), 1,417 guests, and 12 spiders.
Key: Admin, Global Mod, Mod
Newest Members
AemStones, LucasJoshua, Baklazhan, Hanky27, firatv
19055 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
c_move and prticle funcitons #236441
11/14/08 08:27
11/14/08 08:27
Joined: Jul 2008
Posts: 54
Taipei, Taiwan
PlaystationThree Offline OP
Junior Member
PlaystationThree  Offline 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: PlaystationThree] #236630
11/15/08 13:11
11/15/08 13:11
Joined: Jul 2008
Posts: 1,178
England
M
MrGuest Offline
Serious User
MrGuest  Offline
Serious User
M

Joined: Jul 2008
Posts: 1,178
England
post the code you have

at a guess i think you're just getting the coordinates too early

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 Offline
Expert
EvilSOB  Offline
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 Offline OP
Junior Member
PlaystationThree  Offline 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 Offline
Expert
EvilSOB  Offline
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
O
Ottawa Offline
User
Ottawa  Offline
User
O

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 smile

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 Offline
Expert
Uhrwerk  Offline
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: Uhrwerk] #236899
11/17/08 01:14
11/17/08 01:14
Joined: Apr 2006
Posts: 737
Ottawa, Canada
O
Ottawa Offline
User
Ottawa  Offline
User
O

Joined: Apr 2006
Posts: 737
Ottawa, Canada
Hi Uhrwerk

Thanks for the info. smile


Ottawa

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 Offline OP
Junior Member
PlaystationThree  Offline 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

Moderated by  HeelX, Lukas, rayp, Rei_Ayanami, Superku, Tobias, TWO, VeT 

Gamestudio download | chip programmers | Zorro platform | shop | Data Protection Policy

oP group Germany GmbH | Birkenstr. 25-27 | 63549 Ronneburg / Germany | info (at) opgroup.de

Powered by UBB.threads™ PHP Forum Software 7.7.1