Particle Component position

Ask for help about creating mods and scripts for Grimrock 2 or share your tips, scripts, tools and assets with other modders here. Warning: forum contains spoilers!
User avatar
AdrTru
Posts: 223
Joined: Sat Jan 19, 2013 10:10 pm
Location: Trutnov, Czech Republic

Particle Component position

Post by AdrTru »

Hi,

I try to make Particle Component on altar and I need create this component by script in different heigth. Is there some possibility for inscript changing position of this particle?
In Log1 was property translate in FX object, but in LOG2 I dont find similar property.

What it means ParticleComponent:getSortOffset() ? solved this property my problem?
My LOG2 projects: virtual money, Forge recipes, liquid potions and
MultiAlcoveManager, Toolbox, Graphic text,
User avatar
Blichew
Posts: 157
Joined: Thu Sep 27, 2012 12:39 am

Re: Particle Component position

Post by Blichew »

As it's a normal entity you could probably mess with getWorldPosition () and setWorldPosition ().
User avatar
AdrTru
Posts: 223
Joined: Sat Jan 19, 2013 10:10 pm
Location: Trutnov, Czech Republic

Re: Particle Component position

Post by AdrTru »

Blichew wrote:s it's a normal entity you could probably mess with getWorldPosition () and setWorldPosition ().
Thank you, but this function worked separately for particle component?
Base object must be in same position all time.
My LOG2 projects: virtual money, Forge recipes, liquid potions and
MultiAlcoveManager, Toolbox, Graphic text,
User avatar
petri
Posts: 1917
Joined: Thu Mar 01, 2012 4:58 pm
Location: Finland

Re: Particle Component position

Post by petri »

Add something like "offset = vec(0, 1, 0)" to particle component's definition.
User avatar
Eleven Warrior
Posts: 752
Joined: Thu Apr 18, 2013 2:32 pm
Location: Australia

Re: Particle Component position

Post by Eleven Warrior »

Hi I know how to solve the problem.... AH release the Assets Pack to LOG 2 and most things will be solved ahy :) It is that simple.
User avatar
antti
Posts: 688
Joined: Thu Feb 23, 2012 1:43 pm
Location: Espoo, Finland
Contact:

Re: Particle Component position

Post by antti »

Eleven Warrior wrote:Hi I know how to solve the problem.... AH release the Assets Pack to LOG 2 and most things will be solved ahy :) It is that simple.
Yeah, it's on our TODO-list but it'll take quite a bit of work since there's a lot of content we have to sort through. We just can't take a copy of our asset folders and put it in a zip file :)
Steven Seagal of gaming industry
User avatar
Eleven Warrior
Posts: 752
Joined: Thu Apr 18, 2013 2:32 pm
Location: Australia

Re: Particle Component position

Post by Eleven Warrior »

Sorry mate I don't understand what you are saying ahy? You should have them already you guys made the game.....

EDIT: I could be wrong here but I think you guys were not prepared for the onslaught of the editor, and as for game testers did you actually use anyone else besides your team?? If not bad move. Most DEVS use outside testers to see if their game works eg: when a player gets a Skype message or presses certain key to check something else thats happening in their world lol. I have seen the bugs and to be honest you really need to get outside game testers before release ahy. Once again as in many games I have played I asked the same questions and got the reply: No we tested in house... They also had the same problems you have had sorry to be a pain but that's how games fall. This I do know. I have been playing games since 1977. Thxs for you time
Last edited by Eleven Warrior on Fri Nov 07, 2014 3:08 pm, edited 1 time in total.
User avatar
Blichew
Posts: 157
Joined: Thu Sep 27, 2012 12:39 am

Re: Particle Component position

Post by Blichew »

antti wrote:
Eleven Warrior wrote:Hi I know how to solve the problem.... AH release the Assets Pack to LOG 2 and most things will be solved ahy :) It is that simple.
Yeah, it's on our TODO-list but it'll take quite a bit of work since there's a lot of content we have to sort through. We just can't take a copy of our asset folders and put it in a zip file :)
In the meantime, as a workaround: do you think you can implement an option to dump object to array (or set of arrays) which then can be printed out for reference ? No assets, just definition. Usual function that prints tables isn't working:

Code: Select all

function tprint (tbl, indent)
	if not indent then indent = 0
	end
	for k, v in pairs(tbl) do
		formatting = string.rep(" ", indent) .. k .. ": "
		if type(v) == "table" then
			print(formatting)
			tprint(v, indent+1)
		else
			print(formatting .. v)
		end
	end
end
I've tried that with console:
sb = spawn("short_bow")
script_entity_1.script.tprint(sb) but nothing happens.
Maybe i should try doing it with GameObject:getComponent(name) to save every component into array ?

:EDIT: I think something is wrong with my tprint function, because:

Image

value sb clearly is a table
User avatar
Eleven Warrior
Posts: 752
Joined: Thu Apr 18, 2013 2:32 pm
Location: Australia

Re: Particle Component position

Post by Eleven Warrior »

Whow that's some serious shit Blichew awesome good job mate :)
User avatar
petri
Posts: 1917
Joined: Thu Mar 01, 2012 4:58 pm
Location: Finland

Re: Particle Component position

Post by petri »

Eleven Warrior wrote:I could be wrong here but I think you guys were not prepared for the onslaught of the editor, and as for game testers did you actually use anyone else besides your team?? If not bad move. Most DEVS use outside testers to see if their game works eg: when a player gets a Skype message or presses certain key to check something else thats happening in their world lol. I have seen the bugs and to be honest you really need to get outside game testers before release ahy. Once again as in many games I have played I asked the same questions and got the reply: No we tested in house... They also had the same problems you have had sorry to be a pain but that's how games fall. This I do know. I have been playing games since 1977. Thxs for you time
Not sure what problems you are referring to...? An yes, we test in-house and we also had a closed beta test :?
Post Reply