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.

Some Questions

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.
Firelight
Member
Member
Posts: 22
Joined: March 27th, 2010, 7:37 am
Name: Firelight
IRC Username: Firelight

Re: Some Questions

Post by Firelight »

About @9,

I was talking about something like a pet. It will only follow me if I triggered it and then it will follow me forever.

What do you mean by dropping it from the inventory?

Again, thanks for the replies! :D
User avatar
Leo_V117
Support Team
Support Team
Posts: 1640
Joined: February 16th, 2010, 8:00 pm
Name: Leo
IRC Username: Leo_V117
Location: That one place...
Contact:

Re: Some Questions

Post by Leo_V117 »

what he means by "dropping" it from the inventory is. When you code an object into the inventory with: r_type $ENT_ITEM you get the function "drop" when you select that item. Thats what he means by "dropping", if you set a model to it eg. r_model "dan/rock" the dropped item can be picked up again.
Firelight
Member
Member
Posts: 22
Joined: March 27th, 2010, 7:37 am
Name: Firelight
IRC Username: Firelight

Re: Some Questions

Post by Firelight »

Hi, can anyone give me an example code of triggered event?

With the triggering part and event part.

Question:

Code: Select all

level_trigger_0 = [if (= $triggerstate -1) [echo "The door is locked"] [echo "You opened the door."]]
How do I trigger this? And how does it "triggers" it?

Thanks in advance :)
User avatar
Venima
Support Team
Support Team
Posts: 259
Joined: February 17th, 2010, 4:56 am
Name: Tombstone
IRC Username: Venima
Location: Somewhere in the eternal planes between the living and the dead

Re: Some Questions

Post by Venima »

First I would say you should change that first bit to "level_trigger_1".

Create a door mapmodel with trigger type 11 and trigger tag 1.

Then create a key mapmodel with trigger type 12 and trigger tag 2. (yes one exists)

Finally below that code write:

Code: Select all

level_trigger_2 = [trigger 1 1]
try picking up the key and walking through the door.

I've never seen $triggerstate before but assuming I know what it is everything should work fine.
Tombstone's Tournament round 2 has begun! Tombstone's Posting Tournament

Try out my: CFG Easy Text Editor (Note: still in beta)

-----Venima
Image
Image
Firelight
Member
Member
Posts: 22
Joined: March 27th, 2010, 7:37 am
Name: Firelight
IRC Username: Firelight

Re: Some Questions

Post by Firelight »

Hi, thanks for the reply.

How do I choose a certain trigger type? When I added a new model, it's tag is level_trigger_0.

Do I use level_trigger_1 for it instead of 0?
User avatar
Leo_V117
Support Team
Support Team
Posts: 1640
Joined: February 16th, 2010, 8:00 pm
Name: Leo
IRC Username: Leo_V117
Location: That one place...
Contact:

Re: Some Questions

Post by Leo_V117 »

Code: Select all

level_trigger_12
Thats for Keys

Code: Select all

level_trigger_11
Thats for Doors
User avatar
Venima
Support Team
Support Team
Posts: 259
Joined: February 17th, 2010, 4:56 am
Name: Tombstone
IRC Username: Venima
Location: Somewhere in the eternal planes between the living and the dead

Re: Some Questions

Post by Venima »

nooo leo, nooo!!!

level_trigger_<whatev> is the tag, not the type.

Select the mapmodel and hit F3 to edit it.
Tombstone's Tournament round 2 has begun! Tombstone's Posting Tournament

Try out my: CFG Easy Text Editor (Note: still in beta)

-----Venima
Image
Image
User avatar
Leo_V117
Support Team
Support Team
Posts: 1640
Joined: February 16th, 2010, 8:00 pm
Name: Leo
IRC Username: Leo_V117
Location: That one place...
Contact:

Re: Some Questions

Post by Leo_V117 »

Wait... What? I thought that

Code: Select all

trigger_tag_<numb>
was the tag. And

Code: Select all

trigger_type_<numb>
was the Type.
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: Some Questions

Post by arcones »

No Leo. ;)
Technically you don't need to code trigger's at all!! (Although it does help) ;)

@Firelight, yes. If you're interested in making doors open only if you have the right key, look here: Opening locked doors This should help you understand Level triggers and Trigger Types! ;)

Arc
Last edited by arcones on March 29th, 2010, 2:42 pm, edited 1 time in total.
Image
Want a user bar like this one? PM Leo!
User avatar
Venima
Support Team
Support Team
Posts: 259
Joined: February 17th, 2010, 4:56 am
Name: Tombstone
IRC Username: Venima
Location: Somewhere in the eternal planes between the living and the dead

Re: Some Questions

Post by Venima »

on the mapmodel yes, in the cfg code, "level_trigger_<numb>" is the tag

arcones, in that code I think the key will open the door before you approach the door. However if you want it more realistic and have the door open when you approach it if you have the key, then:

Try the code below in the cfg (hit F6).
Then create a mapmodel of a door with trigger tag 1 and trigger type 11 and a mapmodel of a key with trigger tag 2 and trigger type 12. (You can change the tags later, make sure in the code the level_trigger_<num> is the same as the associated mapmodel's trigger tag)

Code: Select all

key1 = 0

level_trigger_1 = [
	if (> $key1 0) [
		trigger 1 1
		echo "You unlock the door with the key."
	] [
		trigger 1 0
		echo "The door is locked."
	]
]
level_trigger_2 = [
	key1 = (+ $key1 1)
	echo "You picked up a key."
]
Tombstone's Tournament round 2 has begun! Tombstone's Posting Tournament

Try out my: CFG Easy Text Editor (Note: still in beta)

-----Venima
Image
Image
Locked