ET Pro 3.2.2 beta test release 3 + serverside-mod support

Official ET Pro announcements here...

Moderators: Forum moderators, developers

User avatar
Rookie One
Posts: 28
Joined: Wed Nov 02, 2005 4:58 am
Location: Ruda Slaska, Poland
Contact:

Post by Rookie One »

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: Select all

********************
ERROR&#58; G_SpawnString&#40;&#41; called while not spawning, file g_spawn.c, line 839
********************
I'm using etpro-lua-2. Here's my code:

Code: Select all

function et_InitGame&#40;levelTime, randomSeed, restart&#41;
	-- spawn a dinghy, yay!
	if &#40;et.trap_Cvar_Get&#40;"mapname"&#41; == "battery"&#41; then
		ent = et.G_SpawnGEntityFromSpawnVars&#40;"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"&#41;
	end
end
</EDIT>
User avatar
Rookie One
Posts: 28
Joined: Wed Nov 02, 2005 4:58 am
Location: Ruda Slaska, Poland
Contact:

Post by Rookie One »

Erm... Bump?
User avatar
Deus
Posts: 1053
Joined: Fri Mar 12, 2004 2:24 am
Location: Germany
Contact:

Post by Deus »

why just don't put it in the battery mapscript :roll:
User avatar
Rookie One
Posts: 28
Joined: Wed Nov 02, 2005 4:58 am
Location: Ruda Slaska, Poland
Contact:

Post by Rookie One »

This is just for test purposes, I want to practise spawning via the Lua scripts.
User avatar
bani
Site Admin
Posts: 2780
Joined: Sun Jul 21, 2002 3:58 am
Contact:

Post by bani »

Rookie One wrote:Erm... Bump?
zinx needs to fix this :alliedmedic:
User avatar
Rookie One
Posts: 28
Joined: Wed Nov 02, 2005 4:58 am
Location: Ruda Slaska, Poland
Contact:

Post by Rookie One »

So this is a bug, right?

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? :scratch: :alliedengineer:
User avatar
ReyalP
Posts: 1663
Joined: Fri Jul 25, 2003 11:44 am

Post by ReyalP »

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? :scratch: :alliedengineer:
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
User avatar
=FF=im2good4u
Posts: 3821
Joined: Wed Feb 05, 2003 7:30 am
Location: The Netherlands, HOLLAND
Contact:

Post by =FF=im2good4u »

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
User avatar
Rookie One
Posts: 28
Joined: Wed Nov 02, 2005 4:58 am
Location: Ruda Slaska, Poland
Contact:

Post by Rookie One »

I made that Wiki article. ;)

So, I cannot move spawned ents or check players' teams yet? :(

Can we get this documented? :alliedsoldier:
User avatar
bani
Site Admin
Posts: 2780
Joined: Sun Jul 21, 2002 3:58 am
Contact:

Post by bani »

you can get players teams from the userinfo string.

vectors are currently busted, so you can't use them yet in setentity.
User avatar
Rookie One
Posts: 28
Joined: Wed Nov 02, 2005 4:58 am
Location: Ruda Slaska, Poland
Contact:

Post by Rookie One »

OK, thanks. Please note us if you get them working. :)
User avatar
bani
Site Admin
Posts: 2780
Joined: Sun Jul 21, 2002 3:58 am
Contact:

Post by bani »

Rookie One wrote:If I could only make a request I'd like to be able to access the level struct. :)
which fields?
User avatar
ouroboro
Posts: 662
Joined: Mon Jul 26, 2004 6:52 pm

Post by ouroboro »

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 :oops:
User avatar
Lagger
Posts: 316
Joined: Mon Sep 29, 2003 8:30 am

Post by Lagger »

dear ourobobo, my favorite forum troll, you don't need to care.
User avatar
bani
Site Admin
Posts: 2780
Joined: Sun Jul 21, 2002 3:58 am
Contact:

Post by bani »

this is all purely serverside. clients can't do a single thing with it.
Locked