View previous topic :: View next topic |
Author |
Message |
Rookie One

Joined: 02 Nov 2005 Posts: 28 Location: Ruda Slaska, Poland
|
Posted: Thu Nov 10, 2005 3:46 am Post subject: |
|
|
Oh, I see. So you cannot spawn things during the game?
<EDIT>I moved the spawning thing to et_InitGame, still the same error:
Code: | ********************
ERROR: G_SpawnString() called while not spawning, file g_spawn.c, line 839
******************** |
I'm using etpro-lua-2. Here's my code:
Code: |
function et_InitGame(levelTime, randomSeed, restart)
-- spawn a dinghy, yay!
if (et.trap_Cvar_Get("mapname") == "battery") then
ent = et.G_SpawnGEntityFromSpawnVars("scriptname", "dinghy1", "origin", "2650 600 100", "classname", "misc_gamemodel", "modelscale", "1", "contents", "1", "mins", "-90 -90 -25", "maxs", "90 90 25", "clipmask", "1", "model", "models/mapobjects/dinghy_sd/dinghy.md3")
end
end |
</EDIT> _________________
I'm a field op!
My crappy website
My even crappier DeviantArt profile
My even more crappier (how is this possible?) dmusic profile |
|
Back to top |
|
 |
Rookie One

Joined: 02 Nov 2005 Posts: 28 Location: Ruda Slaska, Poland
|
|
Back to top |
|
 |
Deus

Joined: 12 Mar 2004 Posts: 1053 Location: Germany
|
|
Back to top |
|
 |
Rookie One

Joined: 02 Nov 2005 Posts: 28 Location: Ruda Slaska, Poland
|
|
Back to top |
|
 |
bani Site Admin

Joined: 21 Jul 2002 Posts: 3685
|
Posted: Fri Nov 11, 2005 10:50 am Post subject: |
|
|
Rookie One wrote: | Erm... Bump? |
zinx needs to fix this  |
|
Back to top |
|
 |
Rookie One

Joined: 02 Nov 2005 Posts: 28 Location: Ruda Slaska, Poland
|
|
Back to top |
|
 |
ReyalP

Joined: 25 Jul 2003 Posts: 1663
|
Posted: Fri Nov 11, 2005 3:43 pm Post subject: |
|
|
Rookie One wrote: |
I've got one more question about the et.gentity_get and et.gentity_set functions. How do I access structs within the gentity_s struct? Like, how do I mess with ent->r or ent->client stuff?  |
You can only access fields for which access has explicitly been given (which is not yet documented). I suspect it follows closely with the ones listed here:
http://wolfwiki.anime.net/index.php/Map_scripting
Maybe more will be added at a later date. It isn't that hard to make generic wrappers for simple C datatypes and provide access to the structs as tables in lua, but it is much better done on the C side (the alternative would be to provide the entire entire struct as a lua 'string' and write all the access functions on the lua side, but that's ugly...). _________________ send lawyers, guns and money |
|
Back to top |
|
 |
=FF=im2good4u

Joined: 05 Feb 2003 Posts: 3925 Location: The Netherlands, HOLLAND
|
Posted: Sat Nov 12, 2005 2:18 am Post subject: |
|
|
well i dont se any entity things in your url but i asked it also and it apaered many of the entity_get where not added yet like the netire client isnt added _________________
  |
|
Back to top |
|
 |
Rookie One

Joined: 02 Nov 2005 Posts: 28 Location: Ruda Slaska, Poland
|
|
Back to top |
|
 |
bani Site Admin

Joined: 21 Jul 2002 Posts: 3685
|
Posted: Sat Nov 12, 2005 3:25 am Post subject: |
|
|
you can get players teams from the userinfo string.
vectors are currently busted, so you can't use them yet in setentity. |
|
Back to top |
|
 |
Rookie One

Joined: 02 Nov 2005 Posts: 28 Location: Ruda Slaska, Poland
|
|
Back to top |
|
 |
bani Site Admin

Joined: 21 Jul 2002 Posts: 3685
|
Posted: Sat Nov 12, 2005 4:52 pm Post subject: |
|
|
Rookie One wrote: | If I could only make a request I'd like to be able to access the level struct.  |
which fields? |
|
Back to top |
|
 |
ouroboro

Joined: 26 Jul 2004 Posts: 662
|
Posted: Sat Nov 12, 2005 10:51 pm Post subject: |
|
|
i just wanna know wtf an ignorant client/player can do with this stuff? i assume nothing, right? tell me i don't need to care so i can stop trying to understand wtf lua is  |
|
Back to top |
|
 |
Lagger

Joined: 29 Sep 2003 Posts: 333
|
Posted: Sat Nov 12, 2005 11:53 pm Post subject: |
|
|
dear ourobobo, my favorite forum troll, you don't need to care. |
|
Back to top |
|
 |
bani Site Admin

Joined: 21 Jul 2002 Posts: 3685
|
Posted: Sat Nov 12, 2005 11:59 pm Post subject: |
|
|
this is all purely serverside. clients can't do a single thing with it. |
|
Back to top |
|
 |
|