Gamestudio Links
Zorro Links
Newest Posts
Executing Trades on Next Bar Open
by vicknick. 06/13/24 08:51
Zorro Beta 2.61: PyTorch
by jcl. 06/10/24 14:42
New FXCM FIX Plugin
by flink. 06/04/24 07:30
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
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
5 registered members (Joey, flink, AndrewAMD, ozgur, Ayumi), 1,195 guests, and 4 spiders.
Key: Admin, Global Mod, Mod
Newest Members
AemStones, LucasJoshua, Baklazhan, Hanky27, firatv
19059 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
A4 WDL to A6 C-Script conversion #175812
01/02/08 00:48
01/02/08 00:48
Joined: Dec 2007
Posts: 34
L
Luzifer Offline OP
Newbie
Luzifer  Offline OP
Newbie
L

Joined: Dec 2007
Posts: 34
Hello everybody,
since I might be able to get hold of an A6 commercial edition soon to replace my very old A4 I downloaded the A6 Trial version to do some tests. At the moment I'm trying to convert a project to A6 code. Well, replacing the old with the new syntax does not seem to be enough. Although it was enough to get the game running I'm encountering numerous errors. I'll just list some errors (some including code) and hope someone can make sense of it.

1) Error in the beginning: "Can't find file <[]>", where the [] is an actual "character missing" square. Could not yet figure out which file is meant.

2) Since I replaced trace with c_trace the feet of player and enemy models are stuck in the ground (no impact on movement though). Worked fine with the original trace, even in A6.

3) I created a crosshair effect, rather a laser pointer, meaning a red dot which appears on every surface the player is aiming at. I first let the player model create an entity:
ent_create(particle_map, gun_muzzle, crosshair);

The entity is then driven by the following function:
Code:
function crosshair {
MY.OVERLAY = ON;
MY.PASSABLE = ON;
MY.FACING = ON;
MY.TRANSPARENT = ON;
my.scale_x = 2;
my.scale_y = 2;
my.scale_z = 2;

while (player.skill20 > 0) {

if (shooting_pose == 0)

{MY.INVISIBLE = OFF;}

else

{MY.INVISIBLE = ON; }

vec_set(gun_target, gun_muzzle);
gun_target.x += 10000; // the weapon has a firing range of up to 10,000 quants
vec_rotate(gun_target, pistol.pan);
vec_add(gun_target, pistol.x);

c_trace(gun_muzzle,gun_target,ignore_passable|ignore_me);

my.x = target.x;
my.y = target.y;
my.z = target.z;


wait(1);
}
}



Unfortunately, no matter what I tried to change, the crosshair does not show up. Nowhere. I used similar code for bullet holes and blood splats and they too, do not show up.

4) Some sounds don't play or don't stop when they should, etc. (even though I do believe I set the right snd_stop) and there was an error in the action for the gun. When I removed the shooting sound it worked again. Very weird indeed.


Well that should be it for now. I hope someone has some ideas. It's not even so much about A4/A6 compatibility, since I just do not understand why some of the code does not work. It should work the same under A6.

Thanks in advance!

Re: A4 WDL to A6 C-Script conversion [Re: Luzifer] #175813
01/02/08 06:46
01/02/08 06:46
Joined: Mar 2003
Posts: 4,264
Wellington
Nems Offline

.
Nems  Offline

.

Joined: Mar 2003
Posts: 4,264
Wellington
I think remove overlay flag as that doubles the transparentcy.

Move origin up for feet prob or show your collision method, polygon? if so adjust -z accordingly (- or + 5;)

If polygon collision usually the model goes up a few quants to accomadate the collision ovoid. (wait(1);c_setminmax(my); to get a tight fit then reduce or add to z as needed.

Re: A4 WDL to A6 C-Script conversion [Re: Nems] #175814
01/03/08 14:45
01/03/08 14:45
Joined: Dec 2007
Posts: 34
L
Luzifer Offline OP
Newbie
Luzifer  Offline OP
Newbie
L

Joined: Dec 2007
Posts: 34
Thank you. I removed transparency and overlay alternatively but it didn't show up.

For collision I'm using the standard hulls fat/narrow.


Another error just showed up, and I'm not quite sure if I even changed anything. I must have, otherwise it makes no sense. In any case, now the player is shooting himself...


Edit: By the way, does someone have an explanation why c_trace and trace behave differently?#

2nd Edit: Just found out what the use_aabb mode really is That part is working now. Just the crosshair is still not there.

3rd Edit: I managed to solve all the problems on my own. They were all related to the new syntax. Anyways, thanks again!

Last edited by Luzifer; 01/04/08 00:54.

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