![]() |
Gmap
Is it possible to make 2d images or flowers and trees lay randomly over a 2d gmap? If it is can anyone explain to me how?
|
have you read the levelgenerator tutorial/doc yet?
|
Yes, I generated a g map with mountains and everything, im talking about images though not tiles.
|
oh, no, there no way to automatically add NPC's (Images)
|
Ah, damn... thanks anyways.
|
Yes you can, in the editor at least:
Make a txt file in the folder levels/npcs... save it as something like editnpcRandomTrees.txt make sure the editnpc is at the beginning. Then inside put: PHP Code:
This will drop 10 random trees in the level, but you can change treecount to change that. Not much, but I'm sure you get the idea and can work from it. Afterwords, open up the editor, then go to Predefined NPCs and go down to Editor Control-NPCs and click it, you should see the editnpc you created in the list. Select it, then just click on the level and it'll drop the trees in the level. DON'T click again unless you want to add more trees, change the tabs to like tiles or such so you won't drop anymore, then simply save the level. |
Quote:
|
Quote:
|
Quote:
|
If you're using NPCs for trees, then you'll be using GANI's and setshape. How about you post the tree image and such so we can better help you?
|
3 Attachment(s)
Well here,its not a tree, but the same basic idea... and i did as you said. But i have no idea what you mean by setting shape. I don't think i ever used it before. I'm fairly new to scripting if you couldn't tell. ;)
|
PHP Code:
|
Quote:
|
Because if you're doing something like a tree or house where you want the tree to have an overlapping top and only block at the base of the trunk, you're going to have to position it correctly in Graalshop and understand that setshape on Gani's start at the (0,0) position of the showcharacter(if using showcharacter, which you should) character box, and not at the corner of the gani like regular NPCs.
|
Quote:
|
Because if you've got a script in it, when you're using the editor, you can see what it will look like online, versus where it will just show the image.
|
Quote:
|
Quote:
|
Quote:
|
Quote:
In a GANI, you can always do something to see if it's online, carry this out offline, this out online. I think there is if (playeronline) or something, if not you could do something like if ( serverr.onlineVar == 27) then online, else offline. |
Well, a couple things wrong with what I posted earlier. I assumed this was for online... Either way, there are going to be some complications... You can either go ahead with this and do it for GS1 so you can see it offline in the editor... or do it in GS2 and not see the immediate effects offline... but make things way easier for you later. If you do it for the editor you're going to have a HELL of a lot of editing to do if you need to change even the slightest thing in the NPCs.
I suggest just going and putting this in the qstone.txt: PHP Code:
EDIT: oh ya, and it's setshape(1,32,32); not 0, sorry about that. |
Quote:
but yah, I agree with you. |
Hence my little comment, thanks for the correction :)
|
| All times are GMT +2. The time now is 10:46 AM. |
Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2026, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.