|
Re: Slightly improved Zelda code
[Re: JetpackMonkey]
#38057
11/16/05 06:37
11/16/05 06:37
|
Joined: Nov 2004
Posts: 862 Australia
DavidLancaster
OP
User
|
OP
User
Joined: Nov 2004
Posts: 862
Australia
|
(@ Bonanza) Walking on Terrain should work, if not then it has something to do with my trace instruction for gravity, the camera should also collide with terrain, if it doesn't then something needs changing in the trace that is hitting the terrain, usually a trace_mode issue. If you wish to implement the ledge and ladder code, it works in this code, but it's not refined, kinda buggy, it's moreso a base idea to build something upon. I highly suggest looking through the code of the Access Phenomenon Demo, and using that as reference to refining it. As the player movement code in that game is built upon this code. (@ DCorwin) That's really really weird, so you're just adding my code above, copying it directly into some script, making sure the scan_event function is moved or defined at the top, then just adding the action to an entity? Can you post word for word how the error appears when you try and run your level? Does it display the line number the error is on? Something else you probably know, but is the variable defined before the action "player_action" (ie above the action in the code)? 300th post! I am a Man now
|
|
|
Re: Slightly improved Zelda code
[Re: JetpackMonkey]
#38063
11/24/05 22:41
11/24/05 22:41
|
Joined: Nov 2004
Posts: 862 Australia
DavidLancaster
OP
User
|
OP
User
Joined: Nov 2004
Posts: 862
Australia
|
Oh yeah, the good ol bobbing in the ground.
Try this ides, just say the player is falling, the trace is returning a value > 0, do an if statement that says, while the player is falling, check to see if result > 0, the moment that result < 0, make player.z = result; (check and do this before the next wait instruction), so that the player's z does not drop below the result value. The other thing I did, if I were moving the player's z based on a force and velocity vector, then the moment result is say < 2, I set the falling velocity to 0, to dramatically decrease the bobbing. I think that's what I did anyway :P
|
|
|
Re: Slightly improved Zelda code
[Re: DavidLancaster]
#38065
11/25/05 07:54
11/25/05 07:54
|
Joined: Oct 2004
Posts: 1,655
testDummy
Serious User
|
Serious User
Joined: Oct 2004
Posts: 1,655
|
Quote:
LOL, only if at the time I was aware of the Code:
tags I could have used :P
While, certainly such programs are already available elsewhere, for fun, after noting the great length of + the lack of indentation in the source code at the beginning of this thread, I quickly wrote a simple, small "Tabinator" program that puts the tabs/indentation back in, or corrects the tabs/identation in, source code. In other words, because I automated a code indentation process, I have the source code from the beginning of the thread with proper indentation. I would post the indented version here, but, because of the large size of the "code" font, it would cause other text in the thread to "run off the page", and I doubt that there is actually any real desire for the properly indented version. If I am wrong, and there is some demand for the version with proper indentation, if enough request it, I may post it in an alternate thread.
|
|
|
Re: Slightly improved Zelda code
[Re: testDummy]
#38066
11/26/05 17:27
11/26/05 17:27
|
Joined: Jan 2005
Posts: 13 italy
koen
Newbie
|
Newbie
Joined: Jan 2005
Posts: 13
italy
|
Sorry AccessPhenomenon, i cannot test ur code for this error: var temp2[6]; 103:5 Error(): Twice defined temp2 my.animdist=0 498:0 Error(50): Parameter unknown animdist Parameter ent_cycle(@2,myanimdist) 572:0 Error(50): Parameter unknown animdist Parameter my.animdist+9*time 573:0 Error(50): Parameter unknown animdist Parameter i'm not a writer and i cannot resolve the problem....
|
|
|
|