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.

Changing mapmodels and factions by triggers

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
java.x.beast
Member
Member
Posts: 194
Joined: August 10th, 2011, 2:35 pm
Name: Addis
IRC Username: javaxbeast
Location: Chicago, IL
Contact:

Changing mapmodels and factions by triggers

Post by java.x.beast »

I was wondering if it was possible to change mapmodel numbers and factions by triggers.

The reason for changing mapmodels was so that the creature would "respawn". I was thinking if it was possible to place a bunch of invisble map models with numbers of -1 or less and then when a trigger is triggered, it would change the mapmodel number from -1 to the number of the creature.

Another way I was thinking of doing this was by putting the change mapmodel number code into the r_destroy command, so that when the creature is killed, it will change the mapmodel number to -1 and then sleep for 30000 milliseconds, then change the mapmodel number back to the creature's original number.

Also, I wanted to know if I could do the same thing with factions, so that I can have friendly creatures like in runescape. So that they only attack you when you attack them. If there was a way to code it so that the faction would be the same as yours and then when you attack it, it changes the faction to the enemies.

Thanks,
CEO of Vulcanis Entertainment,
Addis Regassa
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!!!
User avatar
BlackGulf
Member
Member
Posts: 127
Joined: August 28th, 2011, 5:07 pm
Name: Trevor
IRC Username: BlackGulf
Location: Stalkin' Your Mom
Contact:

Re: Changing mapmodels and factions by triggers

Post by BlackGulf »

just like Mercenaries 2: World In Flames
but seriously i doubt it, maybe you should ask Hirato, as CP Pointed Out
Last edited by BlackGulf on October 10th, 2011, 8:55 pm, edited 1 time in total.
Image

Current Project
The Adventures Of NotaPig

Models Image
Maps Image
Coding Image
Textures Image
Music and SFX Image

In Need Of Staff.
chocolatepie33
Support Team
Support Team
Posts: 2458
Joined: April 27th, 2010, 5:31 pm
IRC Username: CP

Re: Changing mapmodels and factions by triggers

Post by chocolatepie33 »

blackgulf, that's not helping. Try to post something actually helpful/meaningful.

@java: this might be possible, but I've never heard of anything even similar to this being executed. Hirato will likely have some kind of method to get what you're achieving. I've heard of using doors and teleporters to teleport mass amounts of creatures before, but this is a bit more complex. If you want something like this in the future, it's best you PM it to Hirato, or you could put it up at the 2.8 wishlist post. Then you may get some more ideas.
Julius wrote:Contribute to http://www.opengameart.org NOW!
Save the wiki!
Hirato
Developer
Developer
Posts: 689
Joined: May 30th, 2009, 1:23 pm
IRC Username: hirato

Re: Changing mapmodels and factions by triggers

Post by Hirato »

The reason for changing mapmodels was so that the creature would "respawn". I was thinking if it was possible to place a bunch of invisble map models with numbers of -1 or less and then when a trigger is triggered, it would change the mapmodel number from -1 to the number of the creature.

Another way I was thinking of doing this was by putting the change mapmodel number code into the r_destroy command, so that when the creature is killed, it will change the mapmodel number to -1 and then sleep for 30000 milliseconds, then change the mapmodel number back to the creature's original number.
You should really delete (r_destroy) the dead ones after a while, the RPG provides spawning mechanisms via r_spawn_* commands and the spawn entity, use them!
Also, I wanted to know if I could do the same thing with factions, so that I can have friendly creatures like in runescape. So that they only attack you when you attack them. If there was a way to code it so that the faction would be the same as yours and then when you attack it, it changes the faction to the enemies.
You could, but there's nothing stopping you from having making a faction go hostile to another or likewise become friendly. I am definitely going for something similar (ie, they retaliate when you attack them). The RPG does have the means to do that presently, but I'm not quite sure if everything's ready.

if you want to change their faction, it would work as follows

Code: Select all

r_select_char foe_reference [
  r_char_faction new_fac
]
This is not a url, clicking it is pointless
Locked