Thread: Gmap
View Single Post
  #6  
Old 12-27-2007, 09:43 PM
DustyPorViva DustyPorViva is offline
Will work for food. Maybe
DustyPorViva's Avatar
Join Date: Sep 2003
Location: Maryland, USA
Posts: 9,589
DustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond repute
Send a message via AIM to DustyPorViva Send a message via MSN to DustyPorViva
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:
if (mousedown && leftmousebutton) {
  
treecount=10;
  for (
i=0;i<treecount;i++) putnpc door.png,tree.txt,(int(mousex/64)*64)+int(random(0,64)),(int(mousey/64)*64)+int(random(0,64));

You'll also have to make a file called tree.txt and put it in your Graal folder. Inside the tree.txt, have the script for your tree.
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.
Reply With Quote