Gamestudio Links
Zorro Links
Newest Posts
Zorro 2.70
by jcl. 09/29/25 09:24
optimize global parameters SOLVED
by dBc. 09/27/25 17:07
ZorroGPT
by TipmyPip. 09/27/25 10:05
assetHistory one candle shift
by jcl. 09/21/25 11:36
Plugins update
by Grant. 09/17/25 16:28
AUM Magazine
Latest Screens
Rocker`s Revenge
Stug 3 Stormartillery
Iljuschin 2
Galactic Strike X
Who's Online Now
4 registered members (NewbieZorro, Grant, TipmyPip, AndrewAMD), 13,346 guests, and 5 spiders.
Key: Admin, Global Mod, Mod
Newest Members
krishna, DrissB, James168, Ed_Love, xtns
19168 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Newbie can't make connection: player walk #366455
04/04/11 00:13
04/04/11 00:13
Joined: Mar 2006
Posts: 14
California
R
Rockfleet Offline OP
Newbie
Rockfleet  Offline OP
Newbie
R

Joined: Mar 2006
Posts: 14
California
I've looked at/run all the Lite-C tutorials - they make sense - and I can build levels - no problem - but I can't get the darn wizard to walk! I'm impressed with Gamestudio (A8) but it's making me feel like an idiot! I've built simple level, added Lite-C script, run the script, cut/pasted options for player_walk, tried with Wizard in the level and out of the level. Script examples don't appear to be adding the wizard, so I've placed him in the level, but all he does is run through animation frames. Is there a step-by-step instruction anywhere? This isn't rocket science and I'm, presumably, not a complete idiot after years of engineering and modeling.

Re: Newbie can't make connection: player walk [Re: Rockfleet] #366456
04/04/11 00:20
04/04/11 00:20
Joined: Dec 2008
Posts: 1,660
North America
Redeemer Offline
Serious User
Redeemer  Offline
Serious User

Joined: Dec 2008
Posts: 1,660
North America
Hi,

To connect a script to a level, you must first open the level's properties and assign the script through the dialog box you see on the first tab. Then, you must open your entity's properties and assign your action to the wizard under the behavior panel.

Hope that helps. laugh


Eats commas for breakfast.

Play Barony: Cursed Edition!
Re: Newbie can't make connection: player walk [Re: Redeemer] #366457
04/04/11 00:28
04/04/11 00:28
Joined: Mar 2006
Posts: 14
California
R
Rockfleet Offline OP
Newbie
Rockfleet  Offline OP
Newbie
R

Joined: Mar 2006
Posts: 14
California
Okay, thanks, although I tried that, I will try it again. So its okay, I guess, to place the player in the level in WED first. Here goes. . .

Re: Newbie can't make connection: player walk [Re: Redeemer] #366458
04/04/11 00:35
04/04/11 00:35
Joined: Mar 2006
Posts: 14
California
R
Rockfleet Offline OP
Newbie
Rockfleet  Offline OP
Newbie
R

Joined: Mar 2006
Posts: 14
California
I just tried that but I get a black screen with a "engine not responding" message.

Re: Newbie can't make connection: player walk [Re: Rockfleet] #366460
04/04/11 01:00
04/04/11 01:00
Joined: Dec 2008
Posts: 1,660
North America
Redeemer Offline
Serious User
Redeemer  Offline
Serious User

Joined: Dec 2008
Posts: 1,660
North America
Make sure to place a wait(1); instruction in your action's while() loop, otherwise it will prevent the engine from "breathing": updating the video, receiving input, etc.


Eats commas for breakfast.

Play Barony: Cursed Edition!
Re: Newbie can't make connection: player walk [Re: Redeemer] #366461
04/04/11 01:20
04/04/11 01:20
Joined: Mar 2006
Posts: 14
California
R
Rockfleet Offline OP
Newbie
Rockfleet  Offline OP
Newbie
R

Joined: Mar 2006
Posts: 14
California
Good point - I remember that's important - I'll check. Your help is much appreciated! Logging out for awhile.

Re: Newbie can't make connection: player walk [Re: Rockfleet] #366463
04/04/11 02:04
04/04/11 02:04
Joined: Dec 2008
Posts: 1,660
North America
Redeemer Offline
Serious User
Redeemer  Offline
Serious User

Joined: Dec 2008
Posts: 1,660
North America
Also remember that if you run a level with a script attached, it actually doesn't run the level at all: it runs the script, which is then given the responsibility to load the level. Thus you must use a level_load() statement in your function main() to load the level when you run the script through the level editor.

It's confusing, I know. tongue


Eats commas for breakfast.

Play Barony: Cursed Edition!
Re: Newbie can't make connection: player walk [Re: Redeemer] #366464
04/04/11 02:10
04/04/11 02:10
Joined: Mar 2006
Posts: 14
California
R
Rockfleet Offline OP
Newbie
Rockfleet  Offline OP
Newbie
R

Joined: Mar 2006
Posts: 14
California
My Wizard walks around now! What a relief. Now, how do I make his footsteps make noise. I think I've seen a few examples, but not in Lite-C. Also, how can I add a toggle to switch from 3rd person camera to 1st person, where all I see are maybe my arm when extended? I know, us newbies are incorrigible. . .

Re: Newbie can't make connection: player walk [Re: Rockfleet] #366467
04/04/11 03:20
04/04/11 03:20
Joined: Dec 2008
Posts: 1,660
North America
Redeemer Offline
Serious User
Redeemer  Offline
Serious User

Joined: Dec 2008
Posts: 1,660
North America
To make footsteps, you need to use ent_playsound() to play a sound effect at the entity's location. To have the sound effect play only during certain parts of the wizard's animation, you will have to use some tricky conditional statements that check his current state of animation and play a sound effect. There's no one way to do this, so I'll leave it up to you to figure out; but if you need further help, I can write you an example. laugh

To create a first person camera, you'll need to modify the position and rotation vectors of the "camera" object. An easy way to do this would be:
Code:
camera.x = my.x;
camera.y = my.y;
camera.z = my.z;
camera.pan = my.pan;
camera.tilt = my.tilt;
camera.roll = my.roll;


But a simpler way to write that would be:
Code:
vec_set (camera.x, my.x);
vec_set (camera.pan, my.pan);



Both blocks of code will place the camera at the entity's origin. Of course, you can move the camera up or down by simply adding or subtracting to the Z parameter of the camera object.


Eats commas for breakfast.

Play Barony: Cursed Edition!
Re: Newbie can't make connection: player walk [Re: Redeemer] #366544
04/04/11 23:06
04/04/11 23:06
Joined: Mar 2006
Posts: 14
California
R
Rockfleet Offline OP
Newbie
Rockfleet  Offline OP
Newbie
R

Joined: Mar 2006
Posts: 14
California
This is very cool - much appreciated! I'll start experimenting. I apologize for my lack of savy but am an isolated user. If I get overly frustrated I may need further assistance, but will do my best. . .


Gamestudio download | 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