Hi! Welcome to the forum for Platinum Arts Sandbox Free 3D Game Maker. I currently have the forums locked as I am attempting to properly update them.

In the meantime please join the new Discord Server!

If you have any questions please e-mail me through the Platinum Arts website.

Textures, Models and some Code

Having issues not related to a specific Sandbox game mode? Get help here!
Please also read the rules for support when posting support requests.
Failure to comply with the forum rules may result in your topic being locked without resolution.
Locked
idunno
Member
Member
Posts: 26
Joined: September 17th, 2010, 1:04 am

Textures, Models and some Code

Post by idunno »

Hi,

I just wanted to know...

1) Is it possible to import a custom texture so that it will fit on my map without having to re-size anything? Basically, in my map one part of my building is made of 2x10 of the smallest grid sizes, so is it possible to get a texture to fit on that space exactly without changing anything? (I hope that makes sense...)

Kinda like this...
□□□□□□□□□ <-so this is one row
□□□□□□□□□ <-this is the other and each square is the smallest grid size

2) I'm having trouble with my models (again... see 'model texture'). I can import them, but I can't see the texture. I've used the same steps as I did before (I wrote them down in case) and it worked for a while, but then it suddenly stopped working. I'm not sure what's going on, but I can't see the edited texture in Wings and I'm not sure why? Any ideas or is it just that my programs are tempremental??? BTW I'm using wings 3d and sb 2.5

3) I also have a question about coding. I haven't coded anythign before, but I'm just trying to make a basic game, where the player is assigned a quest to find three lost items and then has to take them back to an altar. I followed the example on 'how to make a working quest' by daltonds1 and just wanted to make sure that this is right and where it's supposed to go... :D

Code: Select all

//Picking up items
level_trigger_1 = [
   offerring_bowl = (+ $offerring_bowl 1)
   echo "You picked up the Offerring Bowl"
]

level_trigger_1 = [
   lare = (+ $lare 1)
   echo "You picked up the Lare"
]
//End Picking Up Items


//Start Quest

level_trigger_2 = [
   showgui Quest
]

newgui Quest [
   guitext "Hello! Welcome home. Do you want to make an offerring at the Lararium?" chat
   guibar
   guibutton "Yes" "showgui Quest_Yes"
   guibutton "No" "cleargui"
]
newgui Quest_Yes [
   guitext "Great! But do you remember where it is?" chat
   guibar
   guibutton "Yes" "showgui Quest_Yes1"
   guibutton "No" "cleargui"
]
newgui Quest_Yes1 [
   guitext "Find the Lararium" chat
   guibar
   guibutton "Let's go!" "cleargui"
]

level_trigger_2 = [showgui Man]

newgui Man [
   guitext "You found the Lararium! But I can't find the Lare or the Offerring Bowl" chat
   guitext "Do you want to find the Lare and the Offerring Bowl?" chat
   guibar
   guibutton "Yes" "showgui Quest_Yes"
   guibutton "No" "cleargui"
]
newgui Quest_Yes [
   guitext "Go and find the Lare and the Offerring Bowl" chat
   guitext "Bring them back here" chat
   guibar 
   guibutton "Ok. Let's go!" cleargui"
]

level_trigger_3 = [showgui Man]

newgui Man [
   guitext "Did you find the Lare and Offerring Bowl yet?" chat
   guibar
   guibutton "Yes!" "showgui Man1"
   guibutton "No, not yet" "cleargui"
]

newgui Man1
   guitext "Great! Put them in the Lararium" chat
   guibar
   guilist [ 
      guibutton "Ok" [
         if ( > $offerring_bowl 0)
            ( > $lare 0)  [
            money = ( + $money 20) 
            offerring_bowl = ( - $offerring_bowl 1)
            lare = ( - $lare 1)
      echo "Quest Completed: You earn 20 gold and have pleased your ancestors and the gods."
         ]
        ]
]
]

//End quest
Thanks in advance,
idunno
chocolatepie33
Support Team
Support Team
Posts: 2458
Joined: April 27th, 2010, 5:31 pm
IRC Username: CP

Re: Textures, Models and some Code

Post by chocolatepie33 »

1) that's very confusing, but you can try /vscale ## (in %).
2) it's mostly right, but you can't have triggers repeat, so if you use level_trigger_1 once, then that's it. You've used it twice at least. Same with the rest.
Also, you can't have newgui Man more than once. That confuses the engine (that's the best way to put it). An alternate solution is to use this:

Code: Select all

level_trigger_1 = [showgui npc1-1]
newgui npc1-1 [
guitext "hi"
guibar
guibutton "bye" [cleargui]
] "Man"

newgui npc1-2 [
guitext "what's up"
guibar
guibutton "not much" [cleargui]
] "Man"
That way, the engine recognizes the different dialogues and uses each one in the right way. I used to make the same mistake when I first used PAS. Adding "Man" afterwards should rename the menu to that.
Last edited by chocolatepie33 on October 10th, 2011, 5:06 pm, edited 1 time in total.
Julius wrote:Contribute to http://www.opengameart.org NOW!
Save the wiki!
arcones
Support Team
Support Team
Posts: 2734
Joined: January 13th, 2010, 12:42 pm
Name: Timothy
IRC Username: I use Steam
Location: Looking over your shoulder...
Contact:

Re: Textures, Models and some Code

Post by arcones »

CP's right. I'd mostly suggest creating an inventory so you can hold things easier and keep track of items. As far as I can tell, you don't have one.
Image
Want a user bar like this one? PM Leo!
idunno
Member
Member
Posts: 26
Joined: September 17th, 2010, 1:04 am

Re: Textures, Models and some Code

Post by idunno »

Hi,

Sorry for the delay and thanks for your help! I'll give it a go :)

Also, how do I create an inventory? I imagine that it involves some code?
chocolatepie33
Support Team
Support Team
Posts: 2458
Joined: April 27th, 2010, 5:31 pm
IRC Username: CP

Re: Textures, Models and some Code

Post by chocolatepie33 »

yes, it does involve code. Search fer it.
Julius wrote:Contribute to http://www.opengameart.org NOW!
Save the wiki!
idunno
Member
Member
Posts: 26
Joined: September 17th, 2010, 1:04 am

Re: Textures, Models and some Code

Post by idunno »

I think I've fixed it and added an inventory. Is it correct now?

Code: Select all

//Picking up items
level_trigger_1 = [
   offerring_bowl = (+ $offerring_bowl 1)
   echo "You picked up the Offerring Bowl"
   lare = (+ $lare 1)
   echo "You picked up the Lare"
]
//End Picking Up Items

newgui main [
   guilist [
   guilist [
   guibutton "Quest" "showgui quests"
   guibutton "Inventory" "showgui inventory"
   ]	
]
   guibar
   @main
]

newgui Inventory [
   guibutton "Back" "cleargui 1"
   guibar
   guitext (format "You have %1 Lare" $lare)
   guitext (format "You have %1 Offerring Bowl" $offerringbowl)
   ]	

//Start Quest

level_trigger_2 = [
   showgui Quest
]

newgui Quest [
   guitext "Hello! Welcome home. Do you want to make an offerring at the 

Lararium?" chat
   guibar
   guibutton "Yes" "showgui Quest_Yes"
   guibutton "No" "cleargui"
]
newgui Quest_Yes [
   guitext "Great! But do you remember where it is?" chat
   guibar
   guibutton "Yes" "showgui Quest_Yes1"
   guibutton "No" "cleargui"
]
newgui Quest_Yes1 [
   guitext "Find the Lararium" chat
   guibar
   guibutton "Let's go!" "cleargui"
]

level_trigger_2 = [showgui npc1-1]

newgui npc1-1 [
   guitext "You found the Lararium! But I can't find the Lare or the Offerring 

Bowl" chat
   guitext "Do you want to find the Lare and the Offerring Bowl?" chat
   guibar
   guibutton "Yes" "showgui Quest_Yes"
   guibutton "No" "cleargui"
] "Man"
newgui Quest_Yes [
   guitext "Go and find the Lare and the Offerring Bowl" chat
   guitext "Bring them back here" chat
   guibar 
   guibutton "Ok. Let's go!" cleargui"
]

level_trigger_3 = [showgui Man]

newgui npc1-2 [
   guitext "Did you find the Lare and Offerring Bowl yet?" chat
   guibar
   guibutton "Yes!" "showgui Man1"
   guibutton "No, not yet" "cleargui"
]"Man"

newgui npc1-3
   guitext "Great! Put them in the Lararium" chat
   guibar
   guilist [ 
      guibutton "Ok" [
         if ( > $offerring_bowl 0)
            ( > $lare 0)  [
            money = ( + $money 20) 
            offerring_bowl = ( - $offerring_bowl 1)
            lare = ( - $lare 1)
      echo "Quest Completed: You earn 20 gold and have pleased your ancestors 

and the gods."
         ]"Man"
        ]
]
]

//End quest
    
With the level_trigger_1, I'm not sure if this is right.... Do I have to put both items under the same trigger or do I have to change one of them?
so it would be...

Code: Select all

//Picking up items
level_trigger_1 = [
   offerring_bowl = (+ $offerring_bowl 1)
   echo "You picked up the Offerring Bowl"
]

level_trigger_12 = [
   lare = (+ $lare 1)
   echo "You picked up the Lare"
]
//End Picking Up Items
Sorry, I'm a bit confused on how to pick up more than 1 item. I've checked out the forum, but can't find anything and I've also looked at the code for 'Village', but that's totally confused me.

But, thanks for all your help! I really appreciate it!! :)
arcones
Support Team
Support Team
Posts: 2734
Joined: January 13th, 2010, 12:42 pm
Name: Timothy
IRC Username: I use Steam
Location: Looking over your shoulder...
Contact:

Re: Textures, Models and some Code

Post by arcones »

Simply put, it's different triggers for different pick-up items. Otherwise, each time you find a level trigger that's 1, you pick up both the offering bowl and the lare. I'm not quite sure that's the way you want it, so you'd want to separate those into different triggers.

That said, it also allows for longer quests :)
Image
Want a user bar like this one? PM Leo!
java.x.beast
Member
Member
Posts: 194
Joined: August 10th, 2011, 2:35 pm
Name: Addis
IRC Username: javaxbeast
Location: Chicago, IL
Contact:

Re: Textures, Models and some Code

Post by java.x.beast »

Also another thing, I dont think the people who play your game want to see "Yes1" or anything at the top of the gui. So I would suggest putting "Yes" in quotations after the end of the gui.
Age of Darkness
Maps: Image
Music: Image
Models: Image
Scripts: Image
Other: Image
Visit the company website: (In progress (Expected to be released in two weeks :uber:) 8-) :D 8-) )
Visit the company page on ModDB: Vulcanis Entertainment
java.x.beast wrote: I got them moves like JAGger!!!
Locked