Page 1 of 1

[Cubescript] Kill player trough trigger; spawn monsters?

Posted: September 28th, 2011, 11:03 am
by kddekadenz
I've already searched the cube 2 wiki, but I couldn't find any solution for my problems:

- What is the command to add or take healthpoints from the player?
- Is there any way to spawn monster constantly after a trigger is activated, and until another one is activated?

Re: [Cubescript] Kill player trough trigger; spawn monsters?

Posted: September 29th, 2011, 7:29 am
by Leo_V117
Answer to the first question, You'll need to create yourself a health code. That would be coded in Cubescript.

However, the Monsters... I'm unsure about.

Re: [Cubescript] Kill player trough trigger; spawn monsters?

Posted: October 3rd, 2011, 10:46 am
by kddekadenz
I use Cube 2 to create it:

- There should be already a health code, but I don't know how it works; EDIT: Forget about this one, I found a solution on the wiki. 'Nap' is a command to kill the player.

- Hopefully someone other give me a answer about the monsters.

- New question: How I can change the mapmodel of the trigger via script? I had made such a script time ago, but unfortunately I chose another solution and I didn't remember the command I used for this :o

Re: [Cubescript] Kill player trough trigger; spawn monsters?

Posted: October 5th, 2011, 10:04 pm
by wildflower
kddekadenz wrote:- New question: How I can change the mapmodel of the trigger via script? I had made such a script time ago, but unfortunately I chose another solution and I didn't remember the command I used for this :o
I use this in the RPG version of PAS:

Code: Select all

r_script_signal "interact" [
    r_select_trigger self [
        if (strcmp (r_trigger_mdl_get) "objects/torch_cold") [
            r_trigger_mdl "objects/torch"
        ] [
            r_trigger_mdl "objects/torch_cold"
        ]
    ]
]

Re: [Cubescript] Kill player trough trigger; spawn monsters?

Posted: October 6th, 2011, 3:59 am
by Leo_V117
Great work, wildflower. Looking forward to what you can accomplish in the future.

Re: [Cubescript] Kill player trough trigger; spawn monsters?

Posted: October 6th, 2011, 6:45 am
by kddekadenz
@wildflower: Thank you for your reply, but unfortanetely I don't develop SauerCraft in RPG - Mode.